Skip to content

Commit 29fbd2e

Browse files
author
zouyi6
committed
add LegacyApp11PurchaseRequest 支持古老的客户端sdk
1 parent c516de7 commit 29fbd2e

File tree

3 files changed

+552
-0
lines changed

3 files changed

+552
-0
lines changed

src/AbstractLegacyGateway.php

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,24 @@ public function setAlipayPublicKey($value)
141141
}
142142

143143

144+
/**
145+
* @return mixed
146+
*/
147+
public function getSeller()
148+
{
149+
return $this->getParameter('seller');
150+
}
151+
152+
153+
/**
154+
* @param $value
155+
*
156+
* @return $this
157+
*/
158+
public function setSeller($value)
159+
{
160+
return $this->setParameter('seller', $value);
161+
}
144162
/**
145163
* @return mixed
146164
*/

src/LegacyApp11Gateway.php

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
<?php
2+
3+
namespace Omnipay\Alipay;
4+
5+
use Omnipay\Alipay\Requests\LegacyApp11PurchaseRequest;
6+
7+
/**
8+
* Class LegacyAppGateway
9+
* @package Omnipay\Alipay
10+
* @link https://doc.open.alipay.com/doc2/detail?treeId=59&articleId=103563&docType=1
11+
*/
12+
class LegacyApp11Gateway extends AbstractLegacyGateway
13+
{
14+
15+
/**
16+
* Get gateway display name
17+
*
18+
* This can be used by carts to get the display name for each gateway.
19+
*/
20+
public function getName()
21+
{
22+
return 'Alipay Legacy APP 11 Gateway';
23+
}
24+
25+
26+
public function getDefaultParameters()
27+
{
28+
$data = [];
29+
30+
$data['signType'] = 'RSA';
31+
32+
return $data;
33+
}
34+
35+
36+
/**
37+
* @return mixed
38+
*/
39+
public function getRnCheck()
40+
{
41+
return $this->getParameter('rn_check');
42+
}
43+
44+
45+
/**
46+
* @param $value
47+
*
48+
* @return $this
49+
*/
50+
public function setRnCheck($value)
51+
{
52+
return $this->setParameter('rn_check', $value);
53+
}
54+
55+
56+
/**
57+
* @param array $parameters
58+
*
59+
* @return \Omnipay\Common\Message\AbstractRequest
60+
*/
61+
public function purchase(array $parameters = [])
62+
{
63+
return $this->createRequest(LegacyApp11PurchaseRequest::class, $parameters);
64+
}
65+
}

0 commit comments

Comments
 (0)