Alipay Recurring Payments
Alipay Recurring Payments must be manually approved by a lengthy Stripe verification process. You must contact Stripe support in order to request this feature to be enabled on your account.
Alipay recurring payments for WooCommerce requires the use of the WooCommerce subscription plugin. Alipay recurring payments are not yet supported via Payment Page or MemberPress integrations.
Ater checking the requirements above, you can enable Alipay recurring payments by following the steps below.
By default, China Payments Plugin uses Stripe Connect. You must override Stripe Connect with the use of our helper plugin and set API keys instead. For some reason, Stripe is not allowing Alipay Recurring payments to function without API keys.
Be sure you've already connected Stripe with Stripe Connect before following the steps below. The following steps will override Stripe Connect to use API keys instead. The helper plugin can be uninstalled after this process has been followed. Reconnecting Stripe will override the API keys.
Please download the helper plugin from our public Github repository by clicking the green button "Code" and then "Download Zip" .
Then, unzip the plugin locally. Open the PHP file with any basic text editor or a code editing program like Visual Studio Code.
The contents will look something like this:
1
<?php
2
/**
3
* Plugin Name: China Payments Plugin - Helper
4
* Plugin URI: https://chinapaymentsplugin.com
5
* Description: Easily accept WeChat, Alipay & Credit Card payments from Chinese customers in a simple payment form.
6
* Version: 1.0.0
7
* Author: Gaucho Plugins
8
* Author URI: https://gauchoplugins.com
9
* License: GPLv3
10
* Text Domain: china-payments
11
* Domain Path: /languages/
12
*/
13
14
if( isset( $_GET[ 'update_credentials_stripe' ] ) ) {
15
add_action( "init", function() {
16
ChinaPayments\Settings::instance()->update( [
17
'stripe_test_public_key' => '',
18
'stripe_test_secret_key' => '',
19
'stripe_live_public_key' => '',
20
'stripe_live_secret_key' => '',
21
] );
22
exit;
23
});
24
}
Copied!
Insert your API keys between the empty apostrophes next to the corresponding fields for each key, such as stripe_test_public_key.
Save the file, zip the folder containing the PHP file back up, and then upload it to your WordPress site.
After uploading, append the following parameter to your admin URL ?update_credentials_stripe=1, which will result in a white screen.
It should look something like this:
https://your-domain.com/wp-admin/admin.php?update_credentials_stripe=1
The effect of visiting this URL is that your API keys get stored in the database instead of the Stripe Connect details.
Copy link