Alipay Global SDK PHP
Alipay Global A+ SDK
This project is based on Alipay Global Offical PHP SDK
Since official SDK mainly shows how to access the alipay gateway and does not contain complete functions such as authorization and auto debit, I have added some logic and further realized the standard interface of Alipay Global A+
Attention!
0.0.3+: sendNotifyResponse sendNotifyResponseWithRSA are methods of $notify, eg:
$notify = $alipayGlobal->getNotify();
$notify->sendNotifyResponse(); // $alipayGlobal->sendNotifyResponse() is desprecated
$notify->sendNotifyResponseWithRSA(); // $alipayGlobal->sendNotifyResponseWithRSA() is desprecated
/* getNotifyResponse and getNotifyResponseWithRSA are added,
so you can process it by yourself in memory frameworks like Webman */
$notifyResponseWithRSA = $notify->getNotifyResponse();
$notifyResponseWithRSA = $notify->getNotifyResponseWithRSA();
Demo
The use and functionality of the SDK have been shown with Examples in the project folder
Use
composer require mantoufan/alipay-global-sdk-php
How to use
Initialize
$alipayGlobal = new Mantoufan\AliPayGlobal(array(
'client_id' => 'SANDBOX_5Y3A2N2YEB3002022', // Client ID
'endpoint_area' => 'ASIA', // Optional: NORTH_AMERIA / ASIA / EUROPE
'merchantPrivateKey' => '', // Merchant Private Key