Skip to content

Commit d16c896

Browse files
committed
Remove error unit test method, fixed test verify.
1 parent 2413eac commit d16c896

File tree

7 files changed

+49
-262
lines changed

7 files changed

+49
-262
lines changed

tests/AopAppGatewayTest.php

Lines changed: 27 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,31 @@ public function testPurchase()
5454
}
5555

5656

57+
public function testPurchaseUseCert()
58+
{
59+
$gateway = new AopAppGateway($this->getHttpClient(), $this->getHttpRequest());
60+
$gateway->setAppId('2016101900723821');
61+
$gateway->setSignType('RSA2');
62+
$gateway->setPrivateKey(ALIPAY_ASSET_DIR . '/dist/cert/appPrivateKey');
63+
$gateway->setAlipayRootCert(ALIPAY_ASSET_DIR . '/dist/cert/alipayRootCert.crt');
64+
$gateway->setAlipayPublicCert(ALIPAY_ASSET_DIR . '/dist/cert/alipayCertPublicKey_RSA2.crt');
65+
$gateway->setAppCert(ALIPAY_ASSET_DIR . '/dist/cert/appCertPublicKey_2016101900723821.crt');
66+
$gateway->setCheckAlipayPublicCert(true);
67+
68+
/** @var AopTradeAppPayResponse $response */
69+
$response = $gateway->purchase()->setBizContent([
70+
'subject' => 'test',
71+
'out_trade_no' => date('YmdHis') . mt_rand(1000, 9999),
72+
'total_amount' => '0.01',
73+
'product_code' => 'QUICK_MSECURITY_PAY',
74+
])->send();
75+
76+
$this->assertTrue($response->isSuccessful());
77+
$this->assertFalse($response->isRedirect());
78+
$this->assertNotEmpty($response->getOrderString());
79+
}
80+
81+
5782
public function testPurchaseInline()
5883
{
5984
$testPrivateKey = ALIPAY_ASSET_DIR . '/dist/common/rsa_private_key_inline.pem';
@@ -80,56 +105,6 @@ public function testPurchaseInline()
80105
}
81106

82107

83-
public function testCompletePurchaseReturn()
84-
{
85-
$testPrivateKey = ALIPAY_ASSET_DIR . '/dist/common/rsa_private_key.pem';
86-
$testPublicKey = ALIPAY_ASSET_DIR . '/dist/common/rsa_public_key.pem';
87-
88-
$this->gateway = new AopAppGateway($this->getHttpClient(), $this->getHttpRequest());
89-
$this->gateway->setAppId($this->appId);
90-
$this->gateway->setPrivateKey($this->appPrivateKey);
91-
$this->gateway->setNotifyUrl('https://www.example.com/notify');
92-
93-
$data = [
94-
'memo' => '',
95-
'result' => '{\"alipay_trade_app_pay_response\":{\"code\":\"10000\",\"msg\":\"Success\",\"app_id\":\"20151128008123456\",\"auth_app_id\":\"20151128008123456\",\"charset\":\"UTF-8\",\"timestamp\":\"2016-09-23 18:32:16\",\"total_amount\":\"0.01\",\"trade_no\":\"2016092321001003060123456789\",\"seller_id\":\"2088011466123456789\",\"out_trade_no\":\"201609231231447556\"},\"sign\":\"Q5n3zKIBzhBobd6Z6mP69ZvaBlVxkWOiti2ZCRBRhfEH8/sCWE89Iev94K++QH8W9Zakn9dXTq2tR0O5UWLS1XXgiSd+vUTMQNksxjddI39MQnbJ1hxEtwP5GcWzxeY9YRjXXJdzgdf/xmRS7uRQWv52cGYStlCNN/dianZmuDk=\",\"sign_type\":\"RSA\"}',
96-
'resultStatus' => '9000'
97-
];
98-
99-
$result = json_decode(stripslashes($data['result']), true);
100-
101-
$signer = new Signer($result['alipay_trade_app_pay_response']);
102-
$signer->setSort(false);
103-
$signer->setEncodePolicy(Signer::ENCODE_POLICY_JSON);
104-
105-
$result['sign'] = $signer->signWithRSA($testPrivateKey);
106-
$result['sign_type'] = 'RSA';
107-
108-
$result = addslashes(json_encode($result));
109-
110-
$data['result'] = $result;
111-
112-
$this->gateway->setAlipayPublicKey($testPublicKey);
113-
114-
try {
115-
/** @var AopCompletePurchaseResponse $response */
116-
$response = $this->gateway->completePurchase()->setParams($data)->send();
117-
} catch (InvalidRequestException $e) {
118-
$this->assertTrue(false);
119-
}
120-
121-
$this->assertEquals(
122-
'{"code":"10000","msg":"Success","app_id":"20151128008123456","auth_app_id":"20151128008123456","charset":"UTF-8","timestamp":"2016-09-23 18:32:16","total_amount":"0.01","trade_no":"2016092321001003060123456789","seller_id":"2088011466123456789","out_trade_no":"201609231231447556","sign":"jdl2MwvZLETOGMCrBvFuIHBlg+DUdd3fsuOqZWr78i1MRLoWOYWGoZNionb9hlW\/UwsRJU8D5Su1LgVADpQH9K\/yTjSH6eMQ4uZ+92QLsmeJxWWW2q85Ah36SULKMrJQDoap\/zWAl\/RV56BH8QpzBIPzby9idkt9VCIbIcSTaA0=","sign_type":"RSA"}',
123-
json_encode($response->data())
124-
);
125-
126-
$this->assertEquals('201609231231447556', $response->data('out_trade_no'));
127-
$this->assertTrue($response->isSuccessful());
128-
$this->assertTrue($response->isPaid());
129-
$this->assertEquals('2016092321001003060123456789', $response->getData()['trade_no']);
130-
}
131-
132-
133108
public function testCompletePurchaseNotify()
134109
{
135110
$testPrivateKey = ALIPAY_ASSET_DIR . '/dist/common/rsa_private_key.pem';
@@ -162,7 +137,7 @@ public function testCompletePurchaseNotify()
162137
}
163138

164139
$this->assertEquals(
165-
'{"total_amount":"0.01","buyer_id":"20882025611234567","trade_no":"201609232100100306021234567","refund_fee":"0.00","notify_time":"2016-09-23 19:12:33","subject":"test","sign_type":"RSA","notify_type":"trade_status_sync","out_trade_no":"2016092313071234567","gmt_close":"2016-09-23 19:08:10","trade_status":"TRADE_FINISHED","gmt_payment":"2016-09-23 19:08:10","sign":"Xa2NyOsxOBjW\/q\/RUFZhii2epa4B3ka+2aGsG8knqkiCD8llXrTDm11QtGkSRVw\/hbfcgFPiTkuaKnaaDu\/UfypsVSHToy28PiH5xkBSSd6zHNZCP\/jvjzOa6GPf4tIpfYNVvjaRMRcbn+TRlOFtHOnMMubjsg7K52P+LCugZIA=","gmt_create":"2016-09-23 19:08:09","app_id":"20151128001234567","seller_id":"20880114661234567","notify_id":"da3e56af64bcb163f167240dc0f781agge"}',
140+
'{"total_amount":"0.01","buyer_id":"20882025611234567","trade_no":"201609232100100306021234567","refund_fee":"0.00","notify_time":"2016-09-23 19:12:33","subject":"test","sign_type":"RSA","notify_type":"trade_status_sync","out_trade_no":"2016092313071234567","gmt_close":"2016-09-23 19:08:10","trade_status":"TRADE_FINISHED","gmt_payment":"2016-09-23 19:08:10","sign":"Pj9CrLMvcQB5w1wN0ngelHCSonoe3j6zjYcZsU8kqsE3ZqLb9pHxVuStyztHCKB5\/gzRCVIrJpSjLw0XvuWeu3mz47LMLJo3vi+ODhZOGqFqWzlvSpsWuGSyIVWsVtl4b9gTdu0VzjUn+XpHkrdrZr7y517NvT8Deb1MtYVKasM=","gmt_create":"2016-09-23 19:08:09","app_id":"20151128001234567","seller_id":"20880114661234567","notify_id":"da3e56af64bcb163f167240dc0f781agge"}',
166141
json_encode($response->data())
167142
);
168143

@@ -205,7 +180,7 @@ public function testCompletePurchaseNotifyWithInlineKey()
205180
}
206181

207182
$this->assertEquals(
208-
'{"total_amount":"0.01","buyer_id":"20882025611234567","trade_no":"201609232100100306021234567","refund_fee":"0.00","notify_time":"2016-09-23 19:12:33","subject":"test","sign_type":"RSA","notify_type":"trade_status_sync","out_trade_no":"2016092313071234567","gmt_close":"2016-09-23 19:08:10","trade_status":"TRADE_FINISHED","gmt_payment":"2016-09-23 19:08:10","sign":"Xa2NyOsxOBjW\/q\/RUFZhii2epa4B3ka+2aGsG8knqkiCD8llXrTDm11QtGkSRVw\/hbfcgFPiTkuaKnaaDu\/UfypsVSHToy28PiH5xkBSSd6zHNZCP\/jvjzOa6GPf4tIpfYNVvjaRMRcbn+TRlOFtHOnMMubjsg7K52P+LCugZIA=","gmt_create":"2016-09-23 19:08:09","app_id":"20151128001234567","seller_id":"20880114661234567","notify_id":"da3e56af64bcb163f167240dc0f781agge"}',
183+
'{"total_amount":"0.01","buyer_id":"20882025611234567","trade_no":"201609232100100306021234567","refund_fee":"0.00","notify_time":"2016-09-23 19:12:33","subject":"test","sign_type":"RSA","notify_type":"trade_status_sync","out_trade_no":"2016092313071234567","gmt_close":"2016-09-23 19:08:10","trade_status":"TRADE_FINISHED","gmt_payment":"2016-09-23 19:08:10","sign":"Pj9CrLMvcQB5w1wN0ngelHCSonoe3j6zjYcZsU8kqsE3ZqLb9pHxVuStyztHCKB5\/gzRCVIrJpSjLw0XvuWeu3mz47LMLJo3vi+ODhZOGqFqWzlvSpsWuGSyIVWsVtl4b9gTdu0VzjUn+XpHkrdrZr7y517NvT8Deb1MtYVKasM=","gmt_create":"2016-09-23 19:08:09","app_id":"20151128001234567","seller_id":"20880114661234567","notify_id":"da3e56af64bcb163f167240dc0f781agge"}',
209184
json_encode($response->data())
210185
);
211186

tests/AopF2FGatewayTest.php

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@
66
use Omnipay\Alipay\Common\Signer;
77
use Omnipay\Alipay\Responses\AopCompletePurchaseResponse;
88
use Omnipay\Alipay\Responses\AopCompleteRefundResponse;
9-
use Omnipay\Alipay\Responses\DataServiceBillDownloadUrlQueryResponse;
109
use Omnipay\Alipay\Responses\AopTradePayResponse;
1110
use Omnipay\Alipay\Responses\AopTradePreCreateResponse;
1211
use Omnipay\Alipay\Responses\AopTradeQueryResponse;
1312
use Omnipay\Alipay\Responses\AopTradeRefundQueryResponse;
1413
use Omnipay\Alipay\Responses\AopTradeRefundResponse;
14+
use Omnipay\Alipay\Responses\DataServiceBillDownloadUrlQueryResponse;
1515

1616
class AopF2FGatewayTest extends AbstractGatewayTestCase
1717
{
@@ -47,9 +47,9 @@ public function testCapture()
4747
[
4848
'biz_content' => [
4949
'out_trade_no' => date('YmdHis') . mt_rand(1000, 9999),
50-
'scene' => 'bar_code',
51-
'auth_code' => '288412621343841260',
52-
'subject' => 'test',
50+
'scene' => 'bar_code',
51+
'auth_code' => '288412621343841260',
52+
'subject' => 'test',
5353
'total_amount' => '0.01',
5454
]
5555
]
@@ -71,7 +71,7 @@ public function testPurchase()
7171
[
7272
'biz_content' => [
7373
'out_trade_no' => date('YmdHis') . mt_rand(1000, 9999),
74-
'subject' => 'test',
74+
'subject' => 'test',
7575
'total_amount' => '0.01',
7676
]
7777
]
@@ -114,7 +114,7 @@ public function testRefund()
114114
[
115115
'biz_content' => [
116116
'refund_amount' => '10.01',
117-
'out_trade_no' => '201609220542532413'
117+
'out_trade_no' => '201609220542532413'
118118
]
119119
]
120120
)->send();
@@ -134,8 +134,8 @@ public function testQueryRefund()
134134
$response = $this->gateway->refundQuery(
135135
[
136136
'biz_content' => [
137-
'refund_amount' => '10.01',
138-
'out_trade_no' => '201609220542532412',
137+
'refund_amount' => '10.01',
138+
'out_trade_no' => '201609220542532412',
139139
'out_request_no' => '201609220542532412'
140140
]
141141
]
@@ -156,18 +156,18 @@ public function testSettle()
156156
$response = $this->gateway->settle(
157157
[
158158
'biz_content' => [
159-
'out_request_no' => '201609220542532412',
160-
'trade_no' => '2014030411001007850000672009',
159+
'out_request_no' => '201609220542532412',
160+
'trade_no' => '2014030411001007850000672009',
161161
'royalty_parameters' => [
162162
[
163163
'trans_out' => '111111',
164-
'trans_in' => '222222',
165-
'amount' => '0.01',
164+
'trans_in' => '222222',
165+
'amount' => '0.01',
166166
],
167167
[
168168
'trans_out' => '111111',
169-
'trans_in' => '333333',
170-
'amount' => '0.02',
169+
'trans_in' => '333333',
170+
'amount' => '0.02',
171171
]
172172
]
173173
]
@@ -202,7 +202,7 @@ public function testQueryBillDownloadUrl()
202202
public function testCompletePurchase()
203203
{
204204
$testPrivateKey = ALIPAY_ASSET_DIR . '/dist/common/rsa_private_key.pem';
205-
$testPublicKey = ALIPAY_ASSET_DIR . '/dist/common/rsa_public_key.pem';
205+
$testPublicKey = ALIPAY_ASSET_DIR . '/dist/common/rsa_public_key.pem';
206206

207207
$this->gateway = new AopF2FGateway($this->getHttpClient(), $this->getHttpRequest());
208208
$this->gateway->setAppId($this->appId);
@@ -216,7 +216,7 @@ public function testCompletePurchase()
216216
$signer = new Signer($data);
217217
$signer->setSort(true);
218218
$signer->setEncodePolicy(Signer::ENCODE_POLICY_QUERY);
219-
$data['sign'] = $signer->signWithRSA($testPrivateKey);
219+
$data['sign'] = $signer->signWithRSA($testPrivateKey);
220220
$data['sign_type'] = 'RSA';
221221

222222
$this->gateway->setAlipayPublicKey($testPublicKey);
@@ -227,7 +227,7 @@ public function testCompletePurchase()
227227
$response = $this->gateway->completePurchase(['params' => $data])->send();
228228

229229
$this->assertEquals(
230-
'{"gmt_payment":"2015-06-11 22:33:59","notify_id":"42af7baacd1d3746cf7b56752b91edcj34","seller_email":"[email protected]","notify_type":"trade_status_sync","sign":"T4JCUXoO5sK\/7UjupKEfsSQnjDnw\/1aSJnC6s53SYJyqdjFl+1Lt8dWdNuuXl5yX39leQsYzmk2CDwZx6F\/YIQWCo1LHZME3DYMqH\/F5wT5uiSUk2KYsYbLluW9pi7YHtBXRWKB6jtnn73DWWbC2sN3tDky9KySPizL5jQ1Cd0I=","trade_no":"2015061121001004400068549373","out_trade_no":"21repl2ac2eOutTradeNo322","gmt_create":"2015-06-11 22:33:46","seller_id":"2088211521646673","notify_time":"2015-06-11 22:34:03","subject":"FACE_TO_FACE_PAYMENT_PRECREATE\u4e2d\u6587","trade_status":"TRADE_SUCCESS","sign_type":"RSA"}',
230+
'{"gmt_payment":"2015-06-11 22:33:59","notify_id":"42af7baacd1d3746cf7b56752b91edcj34","seller_email":"[email protected]","notify_type":"trade_status_sync","sign":"cJfsQ18JD4CfM1x9MlXY+dO1Q4L647giOmVQvtDJ+4QgpxFL7mEcU8InkAySWxr\/fRXuy8+FMtowYoN2Pmy7z3WcaX0qC5u8rr5hiidnKq\/m4\/7Tt6v5T4xDnYde6GWRchexsTFpMEFDVYs3Hy\/7ga+1Fgvs4bt0borNcjKNJNQ=","trade_no":"2015061121001004400068549373","out_trade_no":"21repl2ac2eOutTradeNo322","gmt_create":"2015-06-11 22:33:46","seller_id":"2088211521646673","notify_time":"2015-06-11 22:34:03","subject":"FACE_TO_FACE_PAYMENT_PRECREATE\u4e2d\u6587","trade_status":"TRADE_SUCCESS","sign_type":"RSA"}',
231231
json_encode($response->data())
232232
);
233233

@@ -240,7 +240,7 @@ public function testCompletePurchase()
240240
public function testCompleteRefund()
241241
{
242242
$testPrivateKey = ALIPAY_ASSET_DIR . '/dist/common/rsa_private_key.pem';
243-
$testPublicKey = ALIPAY_ASSET_DIR . '/dist/common/rsa_public_key.pem';
243+
$testPublicKey = ALIPAY_ASSET_DIR . '/dist/common/rsa_public_key.pem';
244244

245245
$this->gateway = new AopF2FGateway($this->getHttpClient(), $this->getHttpRequest());
246246
$this->gateway->setAppId($this->appId);
@@ -254,7 +254,7 @@ public function testCompleteRefund()
254254
$signer = new Signer($data);
255255
$signer->setSort(true);
256256
$signer->setEncodePolicy(Signer::ENCODE_POLICY_QUERY);
257-
$data['sign'] = $signer->signWithRSA($testPrivateKey);
257+
$data['sign'] = $signer->signWithRSA($testPrivateKey);
258258
$data['sign_type'] = 'RSA';
259259

260260
$this->gateway->setAlipayPublicKey($testPublicKey);
@@ -265,7 +265,7 @@ public function testCompleteRefund()
265265
$response = $this->gateway->completeRefund(['params' => $data])->send();
266266

267267
$this->assertEquals(
268-
'{"gmt_payment":"2015-06-11 22:33:59","notify_id":"42af7baacd1d3746cf7b56752b91edcj34","seller_email":"[email protected]","notify_type":"trade_status_sync","sign":"T4JCUXoO5sK\/7UjupKEfsSQnjDnw\/1aSJnC6s53SYJyqdjFl+1Lt8dWdNuuXl5yX39leQsYzmk2CDwZx6F\/YIQWCo1LHZME3DYMqH\/F5wT5uiSUk2KYsYbLluW9pi7YHtBXRWKB6jtnn73DWWbC2sN3tDky9KySPizL5jQ1Cd0I=","trade_no":"2015061121001004400068549373","out_trade_no":"21repl2ac2eOutTradeNo322","gmt_create":"2015-06-11 22:33:46","seller_id":"2088211521646673","notify_time":"2015-06-11 22:34:03","subject":"FACE_TO_FACE_PAYMENT_PRECREATE\u4e2d\u6587","trade_status":"TRADE_SUCCESS","sign_type":"RSA"}',
268+
'{"gmt_payment":"2015-06-11 22:33:59","notify_id":"42af7baacd1d3746cf7b56752b91edcj34","seller_email":"[email protected]","notify_type":"trade_status_sync","sign":"cJfsQ18JD4CfM1x9MlXY+dO1Q4L647giOmVQvtDJ+4QgpxFL7mEcU8InkAySWxr\/fRXuy8+FMtowYoN2Pmy7z3WcaX0qC5u8rr5hiidnKq\/m4\/7Tt6v5T4xDnYde6GWRchexsTFpMEFDVYs3Hy\/7ga+1Fgvs4bt0borNcjKNJNQ=","trade_no":"2015061121001004400068549373","out_trade_no":"21repl2ac2eOutTradeNo322","gmt_create":"2015-06-11 22:33:46","seller_id":"2088211521646673","notify_time":"2015-06-11 22:34:03","subject":"FACE_TO_FACE_PAYMENT_PRECREATE\u4e2d\u6587","trade_status":"TRADE_SUCCESS","sign_type":"RSA"}',
269269
json_encode($response->data())
270270
);
271271

tests/AopWapGatewayTest.php

Lines changed: 0 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -50,75 +50,4 @@ public function testPurchase()
5050
$this->assertTrue($response->isRedirect());
5151
$this->assertNotEmpty($response->getRedirectUrl());
5252
}
53-
54-
55-
public function testCompletePurchase()
56-
{
57-
$testPrivateKey = ALIPAY_ASSET_DIR . '/dist/common/rsa_private_key.pem';
58-
$testPublicKey = ALIPAY_ASSET_DIR . '/dist/common/rsa_public_key.pem';
59-
60-
$this->gateway = new AopWapGateway($this->getHttpClient(), $this->getHttpRequest());
61-
$this->gateway->setAppId($this->appId);
62-
$this->gateway->setPrivateKey($this->appPrivateKey);
63-
$this->gateway->setNotifyUrl('https://www.example.com/notify');
64-
$this->gateway->setReturnUrl('https://www.example.com/return');
65-
66-
$str = 'total_amount=0.01&timestamp=2016-09-23+18%3A21%3A58&trade_no=201609232100100306012345678&auth_app_id=201511280012345678&charset=UTF-8&seller_id=20880114612345678&method=alipay.trade.wap.pay.return&app_id=20151128001234567&out_trade_no=201609231211234567&version=1.0';
67-
68-
parse_str($str, $data);
69-
70-
$data['sign'] = (new Signer($data))->signWithRSA($testPrivateKey);
71-
$data['sign_type'] = 'RSA';
72-
73-
$this->gateway->setAlipayPublicKey($testPublicKey);
74-
75-
/**
76-
* @var AopCompletePurchaseResponse $response
77-
*/
78-
$response = $this->gateway->completePurchase(['params' => $data])->send();
79-
80-
$this->assertEquals(
81-
'{"total_amount":"0.01","timestamp":"2016-09-23 18:21:58","trade_no":"201609232100100306012345678","auth_app_id":"201511280012345678","charset":"UTF-8","seller_id":"20880114612345678","method":"alipay.trade.wap.pay.return","app_id":"20151128001234567","out_trade_no":"201609231211234567","version":"1.0","sign":"ZuYCQRwbU50H2x1qevu0ZEFKwTE1piXpBG7GATUh3AZXF3S7CZ07Jj+mVDoa6WrOCGFfA8lHSbE28RX\/pl5QGxRuT+8B4KVo\/NWm3R10NCgqhkvBB+qPfUMSaBgaM+RR5m647QiKROmzX8sd4IgcedIZNKGicem+DJwNPayTLug=","sign_type":"RSA","trade_status":null}',
82-
json_encode($response->data())
83-
);
84-
85-
$this->assertEquals('201609231211234567', $response->data('out_trade_no'));
86-
$this->assertTrue($response->isSuccessful());
87-
$this->assertFalse($response->isPaid());
88-
}
89-
90-
public function testCompleteRefund()
91-
{
92-
$testPrivateKey = ALIPAY_ASSET_DIR . '/dist/common/rsa_private_key.pem';
93-
$testPublicKey = ALIPAY_ASSET_DIR . '/dist/common/rsa_public_key.pem';
94-
95-
$this->gateway = new AopWapGateway($this->getHttpClient(), $this->getHttpRequest());
96-
$this->gateway->setAppId($this->appId);
97-
$this->gateway->setPrivateKey($this->appPrivateKey);
98-
$this->gateway->setNotifyUrl('https://www.example.com/notify');
99-
$this->gateway->setReturnUrl('https://www.example.com/return');
100-
101-
$str = 'total_amount=0.01&timestamp=2016-09-23+18%3A21%3A58&trade_no=201609232100100306012345678&auth_app_id=201511280012345678&charset=UTF-8&seller_id=20880114612345678&method=alipay.trade.wap.pay.return&app_id=20151128001234567&out_trade_no=201609231211234567&version=1.0';
102-
103-
parse_str($str, $data);
104-
105-
$data['sign'] = (new Signer($data))->signWithRSA($testPrivateKey);
106-
$data['sign_type'] = 'RSA';
107-
108-
$this->gateway->setAlipayPublicKey($testPublicKey);
109-
110-
/**
111-
* @var AopCompleteRefundResponse $response
112-
*/
113-
$response = $this->gateway->completeRefund(['params' => $data])->send();
114-
115-
$this->assertEquals(
116-
'{"total_amount":"0.01","timestamp":"2016-09-23 18:21:58","trade_no":"201609232100100306012345678","auth_app_id":"201511280012345678","charset":"UTF-8","seller_id":"20880114612345678","method":"alipay.trade.wap.pay.return","app_id":"20151128001234567","out_trade_no":"201609231211234567","version":"1.0","sign":"ZuYCQRwbU50H2x1qevu0ZEFKwTE1piXpBG7GATUh3AZXF3S7CZ07Jj+mVDoa6WrOCGFfA8lHSbE28RX\/pl5QGxRuT+8B4KVo\/NWm3R10NCgqhkvBB+qPfUMSaBgaM+RR5m647QiKROmzX8sd4IgcedIZNKGicem+DJwNPayTLug=","sign_type":"RSA","trade_status":null}',
117-
json_encode($response->data())
118-
);
119-
120-
$this->assertEquals('201609231211234567', $response->data('out_trade_no'));
121-
$this->assertTrue($response->isSuccessful());
122-
$this->assertFalse($response->isRefunded());
123-
}
12453
}

0 commit comments

Comments
 (0)