Skip to content

Commit ba783c8

Browse files
authored
Merge pull request #13 from alipay/feature-update-composer
update readme
2 parents 6ad6976 + 6b97209 commit ba783c8

File tree

3 files changed

+59
-14
lines changed

3 files changed

+59
-14
lines changed

CHANGELOG.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Changelog
2+
3+
4+
## 1.3.2 - 2024-09-04
5+
* [#13](https://github.com/alipay/global-open-sdk-php/pull/13) update readme
6+
* Add TAOBAO_REBIND
7+
* Add ChangeLog
8+
9+
## 1.3.0 - 2024-09-04
10+
* [#12](https://github.com/alipay/global-open-sdk-php/pull/12) update add namespace
11+
* Add TAOBAO_REBIND
12+
13+
## 1.0.0 - 2020-09-04
14+
* Init object library
15+

README.md

Lines changed: 38 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
```
22
Language:PHP
33
PHP version:5.4.7+
4+
Releass ^1.3.1
45
Copyright:Ant financial services group
56
```
67

@@ -20,21 +21,35 @@ require_once 'vendor/autoload.php';
2021

2122
### Manual Installation
2223

23-
If you do not wish to use Composer, you can download
24-
the [latest release](https://github.com/alipay/global-open-sdk-php/releases). Then, to use the bindings, include the
25-
`init.php` file.
24+
If you do not wish to use Composer, you can download the [latest release](https://github.com/alipay/global-open-sdk-php/releases). Then, to use the bindings, include the `init.php` file.
2625

2726
```php
2827
require_once '/path/to/global-open-sdk-php/init.php';
2928
```
3029

31-
#### 1 Important note
3230

31+
#### 1 Important note
3332
The SDK mainly shows how to access the alipay gateway, which cannot guarantee the performance and stability.
3433

35-
#### 2 The demo code for create order
36-
34+
#### 2 The demo code for create payment
3735
```
36+
use Request\pay\AlipayPayRequest;
37+
use Client\DefaultAlipayClient;
38+
use Model\Amount;
39+
use Model\Buyer;
40+
use Model\Env;
41+
use Model\Merchant;
42+
use Model\Order;
43+
use Model\OsType;
44+
use Model\PaymentFactor;
45+
use Model\PaymentMethod;
46+
use Model\PresentmentMode;
47+
use Model\ProductCodeType;
48+
use Model\SettlementStrategy;
49+
use Model\Store;
50+
use Model\TerminalType;
51+
use Model\WalletPaymentMethodType;
52+
3853
$request = new AlipayPayRequest();
3954
$paymentRequestId = 'PR_' . round(microtime(true) * 1000);
4055
$order = new Order();
@@ -101,12 +116,27 @@ The execute method contains the HTTP request to the gateway.
101116
If you're concerned about HTTP invocation performance, you can implement HTTP invocation yourself.
102117

103118
```
104-
class YourAlipayClient extends BaseAlipayClient{
119+
class YourAlipayClient extends \Client\BaseAlipayClient{
120+
121+
function __construct()
122+
{
123+
$a = func_get_args();
124+
$i = func_num_args() - 2;
125+
if (method_exists($this, $f = '__construct' . $i)) {
126+
call_user_func_array(array($this, $f), $a);
127+
}
128+
}
105129
106-
function __construct($gatewayUrl, $merchantPrivateKey, $alipayPublicKey) {
130+
function __construct1($gatewayUrl, $merchantPrivateKey, $alipayPublicKey)
131+
{
107132
parent::__construct($gatewayUrl, $merchantPrivateKey, $alipayPublicKey);
108133
}
109134
135+
function __construct2($gatewayUrl, $merchantPrivateKey, $alipayPublicKey, $clientId)
136+
{
137+
parent::__construct($gatewayUrl, $merchantPrivateKey, $alipayPublicKey, $clientId);
138+
}
139+
110140
protected function buildCustomHeader(){
111141
return null;
112142
}

model/ScopeType.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ class ScopeType
55
{
66

77
const BASE_USER_INFO = "BASE_USER_INFO";
8-
const AGREEMENT_PAY = "AGREEMENT_PAY";
9-
const USER_INFO = "USER_INFO";
10-
const USER_LOGIN_ID = "USER_LOGIN_ID";
11-
const HASH_LOGIN_ID = "HASH_LOGIN_ID";
12-
const SEND_OTP = "SEND_OTP";
13-
8+
const AGREEMENT_PAY = "AGREEMENT_PAY";
9+
const USER_INFO = "USER_INFO";
10+
const USER_LOGIN_ID = "USER_LOGIN_ID";
11+
const HASH_LOGIN_ID = "HASH_LOGIN_ID";
12+
const SEND_OTP = "SEND_OTP";
13+
const TAOBAO_REBIND = "TAOBAO_REBIND";
1414
}

0 commit comments

Comments
 (0)