Alipay China payment gateway for WooCommerce.
GPL-3.0 License
Woo Alipay adds an Alipay China payment gateway to WooCommerce-powered websites. This Mainland China gateway allows customers to pay both in mobile browsers or from their computer.
This plugin adds the following major features to WooCommerce:
Compatible with WooCommerce Multilingual, WPML, Ultimate Member, and any caching plugin compatible with WooCommerce.
The settings below are added to WooCommerce and WP Weixin when the plugin is active.
The following settings can be accessed in WooCommerce > Settings > Payments > Alipay:
Name | Type | Description |
---|---|---|
Enable/Disable | checkbox | Used to enable/disable the payment gateway. |
Checkout page title | text | Title displayed for the payment gateway on the checkout page. |
Checkout page description | text | Description displayed for the payment gateway on the checkout page. |
Alipay App ID | text | The App ID found in Alipay Open Platform. |
Alipay public key | textarea | The Alipay public key generated in the Alipay Open Platform ("支付宝公钥"). |
Alipay Merchant application private key | textarea | The private key generated with the provided Alipay tool application or the openssl command line.This key is secret and is not recorded in Alipay Open Platform - DO NOT SHARE THIS VALUE WITH ANYONE. |
Sandbox | checkbox | If checked, Run Alipay in sandbox mode, with the settings found in https://openhome.alipay.com/platform/appDaily.htm. |
Exchange Rate | number | Exchange rate against Chinese Yuan (shows if the store currency is not set to Chinese Yuan) |
https://[[your-homepage-url]]
where [[your-homepage-url]]
is the home URL of your website. Creating an app will require one or two working day(s) audit of your website content by Alipay.https://openhome.alipay.com/platform/appManage.htm#/app/[[YOUR_APP_ID]]/appInfo
(replace [[YOUR_APP_ID]]
with the App ID to be used by Woo Alipay).To communicate with the payment gateway, Alipay needs some features activated, to know your website URL, and to be aware of the WooCommerce gateway callback endpoint.
https://openhome.alipay.com/platform/appManage.htm#/app/[[YOUR_APP_ID]]/overview
(replace [[YOUR_APP_ID]]
with the App ID to be used by Woo Alipay).https://openhome.alipay.com/platform/appManage.htm#/app/[[YOUR_APP_ID]]/appInfo
(replace [[YOUR_APP_ID]]
with the App ID to be used by Woo Alipay).https://[[your-domain.com]]
(replace [[your-domain.com]]
with the domain or subdomain running WordPress and Woo Alipay) and click the confirm "确定" button.https
in the callback address type "回调地址类型" field, https://[[your-homepage-url]]/wc-api/WC_Alipay/]]
in the callback address "回调地址" field (replace [[your-homepage-url]]
with the home URL of your website), and leave the verify domain only "只验证域名" checkbox unchecked for added security, then click the confirm "确定" button.To complete the payment gateway configuration, you need to generate an application public key, an application private key and an Alipay public key.
alipay_app_public_key.txt
below).alipay_app_private_key.txt
below) - DO NOT SHARE THIS VALUE WITH ANYONE.openssl
to open the OpenSSL command line tool.genrsa -out alipay_app_private_key.txt 2048
to generate the application private key file (referred to as alipay_app_private_key.txt
below) - DO NOT SHARE THIS VALUE WITH ANYONE.rsa -in alipay_app_private_key.txt -pubout -out alipay_app_public_key.txt
to generate the application public key file (referred to as alipay_app_public_key.txt
below).exit
to quit the command line tool.https://openhome.alipay.com/platform/appManage.htm#/app/[[YOUR_APP_ID]]/appInfo
(replace [[YOUR_APP_ID]]
with the App ID to be used by Woo Alipay).alipay_app_public_key.txt
in the "填写公钥字符" text area.https://openhome.alipay.com/platform/appManage.htm#/app/[[YOUR_APP_ID]]/appInfo
(replace [[YOUR_APP_ID]]
with the App ID to be used by Woo Alipay).alipay_app_private_key.txt
in the "Alipay merchant application private key" field below.The following template file is selected using the locate_template()
and included with load_template()
functions provided by WordPress. This means it can be overloaded in the active WordPress theme. Developers may place their custom template file in the following directories under the theme's folder (in order of selection priority):
plugins/woo-alipay/
woo-alipay/
woocommerce/woo-alipay/
redirected-pay.php
Description The template of the page displayed when users are redirected before payment. The template acts as a placeholder before showing the Alipay payment UI.
Associated style enqueued with key:
woo-alipay-main-style