@@ -35,6 +35,7 @@ The following gateways are provided by this package:
3535
3636| Gateway | Description | 说明 | Links |
3737| :--------------- | :--------------------------- | :--------- | :----------:|
38+ | Alipay_AopPage | Alipay Page Gateway | 电脑网站支付 - new | [ Usage] [ link-wiki-aop-page ] [ Doc] [ link-doc-aop-page ] |
3839| Alipay_AopApp | Alipay APP Gateway | APP支付 - new | [ Usage] [ link-wiki-aop-app ] [ Doc] [ link-doc-aop-app ] |
3940| Alipay_AopF2F | Alipay Face To Face Gateway | 当面付 - new | [ Usage] [ link-wiki-aop-f2f ] [ Doc] [ link-doc-aop-f2f ] |
4041| Alipay_AopWap | Alipay WAP Gateway | 手机网站支付 - new | [ Usage] [ link-wiki-aop-wap ] [ Doc] [ link-doc-aop-wap ] |
@@ -50,23 +51,25 @@ The following gateways are provided by this package:
5051/**
5152 * @var AopAppGateway $gateway
5253 */
53- $gateway = Omnipay::create('Alipay_AopApp');
54+ $gateway = Omnipay::create('Alipay_AopPage');
55+ $gateway->setSignType('RSA2'); // RSA/RSA2/MD5
5456$gateway->setAppId('the_app_id');
5557$gateway->setPrivateKey('the_app_private_key');
58+ $gateway->setAlipayPublicKey('the_alipay_public_key');
59+ $gateway->setReturnUrl('https://www.example.com/return');
5660$gateway->setNotifyUrl('https://www.example.com/notify');
5761
58- $request = $gateway->purchase();
59- $request->setBizContent([
62+ /**
63+ * @var AopTradePagePayResponse $response
64+ */
65+ $response = $gateway->purchase()->setBizContent([
6066 'subject' => 'test',
6167 'out_trade_no' => date('YmdHis') . mt_rand(1000, 9999),
6268 'total_amount' => '0.01',
63- 'product_code' => 'QUICK_MSECURITY_PAY ',
64- ]);
69+ 'product_code' => 'FAST_INSTANT_TRADE_PAY ',
70+ ])->send() ;
6571
66- /**
67- * @var AopTradeAppPayResponse $response
68- */
69- $response = $request->send();
72+ $url = $response->getRedirectUrl();
7073```
7174
7275For general usage instructions, please see the main [ Omnipay] ( https://github.com/omnipay/omnipay )
@@ -113,12 +116,14 @@ or better yet, fork the library and submit a pull request.
113116[ link-donate ] : https://cloud.githubusercontent.com/assets/1573211/18808259/a283d596-828f-11e6-8810-4a2e16d5e319.jpg
114117[ link-donate-paypal ] : https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=lokielse%40gmail%2ecom&lc=US&item_name=Omnipay%20Alipay¤cy_code=USD&bn=PP%2dDonationsBF%3abtn_donate_LG%2egif%3aNonHosted
115118
119+ [ link-wiki-aop-page ] : https://github.com/lokielse/omnipay-alipay/wiki/Aop-Page-Gateway
116120[ link-wiki-aop-app ] : https://github.com/lokielse/omnipay-alipay/wiki/Aop-APP-Gateway
117121[ link-wiki-aop-f2f ] : https://github.com/lokielse/omnipay-alipay/wiki/Aop-Face-To-Face-Gateway
118122[ link-wiki-aop-wap ] : https://github.com/lokielse/omnipay-alipay/wiki/Aop-WAP-Gateway
119123[ link-wiki-legacy-app ] : https://github.com/lokielse/omnipay-alipay/wiki/Legacy-APP-Gateway
120124[ link-wiki-legacy-express ] : https://github.com/lokielse/omnipay-alipay/wiki/Legacy-Express-Gateway
121125[ link-wiki-legacy-wap ] : https://github.com/lokielse/omnipay-alipay/wiki/Legacy-WAP-Gateway
126+ [ link-doc-aop-page ] : https://doc.open.alipay.com/doc2/detail.htm?treeId=270&articleId=105901&docType=1
122127[ link-doc-aop-app ] : https://doc.open.alipay.com/docs/doc.htm?treeId=204&articleId=105051&docType=1
123128[ link-doc-aop-f2f ] : https://doc.open.alipay.com/docs/doc.htm?treeId=194&articleId=105072&docType=1
124129[ link-doc-aop-wap ] : https://doc.open.alipay.com/docs/doc.htm?treeId=203&articleId=105288&docType=1
0 commit comments