Browse Source

更新

tags/v1.0.0
wuliangbo 1 year ago
parent
commit
50bbb0fa21
20 changed files with 263 additions and 238 deletions
  1. +1
    -1
      src/Base/Oauth/Client.php
  2. +0
    -3
      src/Kernel/Traits/SingData.php
  3. +24
    -21
      src/Marketing/Pass/Client.php
  4. +13
    -11
      src/Mini/Identification/Client.php
  5. +7
    -6
      src/Mini/Qrcode/Client.php
  6. +5
    -4
      src/Mini/Risk/Client.php
  7. +9
    -8
      src/Mini/TemplateMessage/Client.php
  8. +24
    -21
      src/OpenPlatform/Agent/Client.php
  9. +3
    -3
      src/OpenPlatform/Authorizer/Mini/BaseInfo/Client.php
  10. +3
    -4
      src/OpenPlatform/Authorizer/Mini/Category/Client.php
  11. +10
    -8
      src/OpenPlatform/Authorizer/Mini/Domain/Client.php
  12. +18
    -15
      src/OpenPlatform/Authorizer/Mini/Experience/Client.php
  13. +17
    -18
      src/OpenPlatform/Authorizer/Mini/Members/Client.php
  14. +44
    -41
      src/OpenPlatform/Authorizer/Mini/Version/Client.php
  15. +12
    -10
      src/OpenPlatform/Base/Client.php
  16. +26
    -23
      src/OpenPublic/Message/Client.php
  17. +13
    -11
      src/OpenPublic/Template/Client.php
  18. +5
    -4
      src/Payment/Fund/Client.php
  19. +17
    -14
      src/Payment/Order/Client.php
  20. +12
    -12
      src/Payment/Pay/Client.php

+ 1
- 1
src/Base/Oauth/Client.php View File

@@ -27,7 +27,7 @@ class Client extends BaseClient
$this->method = 'alipay.user.oauth.token';
$sysParams = $this->buildParams($params);
$url = $this->_toUrlEncodedRequestBody($sysParams);
return $this->httpPost($url, $params['params']);
return $this->httpPost($url, $params);
}

/**


+ 0
- 3
src/Kernel/Traits/SingData.php View File

@@ -49,9 +49,6 @@ trait SingData
if ($this->app->config->get('app_auth_token')) {
$sysParams["app_auth_token"] = $this->app->config->get('app_auth_token');
}
if (!empty($apiParams['biz_content'])) {
$apiParams['biz_content'] = json_encode($apiParams['biz_content'], JSON_UNESCAPED_UNICODE);
}
$sysParams["sign"] = $this->generateSign(array_merge($apiParams, $sysParams), $sysParams["sign_type"]);
return $sysParams;
}


+ 24
- 21
src/Marketing/Pass/Client.php View File

@@ -22,16 +22,17 @@ class Client extends BaseClient
*/
public function createTemplate(string $unique_id, string $tpl_content)
{
$biz_content = [
'unique_id' => $unique_id,
'tpl_content' => $tpl_content
];
$params = [
'biz_content' => [
'unique_id' => $unique_id,
'tpl_content' => $tpl_content
]
'biz_content' => json_encode($biz_content, JSON_UNESCAPED_UNICODE)
];
$this->method = 'alipay.pass.template.add';
$sysParams = $this->buildParams($params);
$url = $this->_toUrlEncodedRequestBody($sysParams);
return $this->httpPost($url);
return $this->httpPost($url, $params);
}

/**
@@ -45,16 +46,17 @@ class Client extends BaseClient
*/
public function updateTemplate(string $tpl_id, string $tpl_content)
{
$biz_content = [
'tpl_id' => $tpl_id,
'tpl_content' => $tpl_content
];
$params = [
'biz_content' => [
'tpl_id' => $tpl_id,
'tpl_content' => $tpl_content
]
'biz_content' => json_encode($biz_content, JSON_UNESCAPED_UNICODE)
];
$this->method = 'alipay.pass.template.update';
$sysParams = $this->buildParams($params);
$url = $this->_toUrlEncodedRequestBody($sysParams);
return $this->httpPost($url);
return $this->httpPost($url, $params);
}

/**
@@ -70,19 +72,19 @@ class Client extends BaseClient
*/
public function addInstance(string $tpl_id, string $tpl_params, string $recognition_type, string $recognition_info)
{
$this->method = 'alipay.pass.instance.add';
$biz_content = [
'tpl_id' => $tpl_id,
'tpl_params' => $tpl_params,
'recognition_type' => $recognition_type,
'recognition_info' => $recognition_info,
];
$params = [
'method' => $this->method,
'biz_content' => [
'tpl_id' => $tpl_id,
'tpl_params' => $tpl_params,
'recognition_type' => $recognition_type,
'recognition_info' => $recognition_info,
]
'biz_content' => json_encode($biz_content, JSON_UNESCAPED_UNICODE)
];
$this->method = 'alipay.pass.instance.add';
$sysParams = $this->buildParams($params);
$url = $this->_toUrlEncodedRequestBody($sysParams);
return $this->httpPost($url);
return $this->httpPost($url, $params);
}

/**
@@ -100,12 +102,13 @@ class Client extends BaseClient
'serial_number' => $serial_number,
'channel_id' => $channel_id,
], $pub_params);

$params = [
'biz_content' => $biz_content
'biz_content' => json_encode($biz_content, JSON_UNESCAPED_UNICODE)
];
$this->method = 'alipay.pass.instance.update';
$sysParams = $this->buildParams($params);
$url = $this->_toUrlEncodedRequestBody($sysParams);
return $this->httpPost($url);
return $this->httpPost($url, $params);
}
}

+ 13
- 11
src/Mini/Identification/Client.php View File

@@ -17,17 +17,18 @@ class Client extends BaseClient
*/
public function queryCertifyzhub(string $biz_id, string $zim_id, int $face_type = 2)
{
$biz_content = [
'biz_id' => $biz_id,
'zim_id' => $zim_id,
'face_type' => $face_type,
];
$params = [
'biz_content' => [
'biz_id' => $biz_id,
'zim_id' => $zim_id,
'face_type' => $face_type,
]
'biz_content' => json_encode($biz_content, JSON_UNESCAPED_UNICODE)
];
$this->method = 'zoloz.identification.customer.certifyzhub.query';
$sysParams = $this->buildParams($params);
$url = $this->_toUrlEncodedRequestBody($sysParams);
return $this->httpPost($url);
return $this->httpPost($url, $params);
}

/**
@@ -41,12 +42,13 @@ class Client extends BaseClient
*/
public function queryUserWeb(string $biz_id, string $zim_id, array $extern_param = [])
{
$biz_content = [
'biz_id' => $biz_id,
'zim_id' => $zim_id,
'extern_param' => json_encode($extern_param, JSON_UNESCAPED_UNICODE),
];
$params = [
'biz_content' => [
'biz_id' => $biz_id,
'zim_id' => $zim_id,
'extern_param' => json_encode($extern_param, JSON_UNESCAPED_UNICODE),
]
'biz_content' => json_encode($biz_content, JSON_UNESCAPED_UNICODE)
];
$this->method = 'zoloz.identification.user.web.query';
$sysParams = $this->buildParams($params);


+ 7
- 6
src/Mini/Qrcode/Client.php View File

@@ -18,16 +18,17 @@ class Client extends BaseClient
*/
public function create(string $url_param, string $query_param, string $describe)
{
$biz_content = [
'url_param' => $url_param,
'query_param' => $query_param,
'describe' => $describe,
];
$params = [
'biz_content' => [
'url_param' => $url_param,
'query_param' => $query_param,
'describe' => $describe,
]
'biz_content' => json_encode($biz_content, JSON_UNESCAPED_UNICODE)
];
$this->method = 'alipay.open.app.qrcode.create';
$sysParams = $this->buildParams($params);
$url = $this->_toUrlEncodedRequestBody($sysParams);
return $this->httpPost($url);
return $this->httpPost($url, $params);
}
}

+ 5
- 4
src/Mini/Risk/Client.php View File

@@ -15,14 +15,15 @@ class Client extends BaseClient
*/
public function detectContent(string $content)
{
$biz_content = [
'content' => $content
];
$params = [
'biz_content' => [
'content' => $content
]
'biz_content' => json_encode($biz_content, JSON_UNESCAPED_UNICODE)
];
$this->method = 'alipay.security.risk.content.detect';
$sysParams = $this->buildParams($params);
$url = $this->_toUrlEncodedRequestBody($sysParams);
return $this->httpPost($url);
return $this->httpPost($url, $params);
}
}

+ 9
- 8
src/Mini/TemplateMessage/Client.php View File

@@ -19,18 +19,19 @@ class Client extends BaseClient
*/
public function send(string $to_user_id, string $form_id, string $user_template_id, string $page, string $data)
{
$biz_content = [
'to_user_id' => $to_user_id,
'form_id' => $form_id,
'user_template_id' => $user_template_id,
'page' => $page,
'data' => $data
];
$params = [
'biz_content' => [
'to_user_id' => $to_user_id,
'form_id' => $form_id,
'user_template_id' => $user_template_id,
'page' => $page,
'data' => $data
]
'biz_content' => json_encode($biz_content, JSON_UNESCAPED_UNICODE)
];
$this->method = 'alipay.open.app.mini.templatemessage.send';
$sysParams = $this->buildParams($params);
$url = $this->_toUrlEncodedRequestBody($sysParams);
return $this->httpPost($url);
return $this->httpPost($url, $params);
}
}

+ 24
- 21
src/OpenPlatform/Agent/Client.php View File

@@ -18,17 +18,18 @@ class Client extends BaseClient
*/
public function create(string $account, array $contact_info, string $order_ticket)
{
$biz_content = [
'account' => $account,
'contact_info' => $contact_info,
'order_ticket' => $order_ticket,
];
$params = [
'biz_content' => [
'account' => $account,
'contact_info' => $contact_info,
'order_ticket' => $order_ticket,
]
'biz_content' => json_encode($biz_content, JSON_UNESCAPED_UNICODE)
];
$this->method = 'alipay.open.agent.create';
$sysParams = $this->buildParams($params);
$url = $this->_toUrlEncodedRequestBody($sysParams);
return $this->httpPost($url);
return $this->httpPost($url, $params);
}

/**
@@ -43,12 +44,12 @@ class Client extends BaseClient
public function miniCreate(array $payload)
{
$params = [
'biz_content' => $payload
'biz_content' => json_encode($payload, JSON_UNESCAPED_UNICODE)
];
$this->method = 'alipay.open.agent.mini.create';
$sysParams = $this->buildParams($params);
$url = $this->_toUrlEncodedRequestBody($sysParams);
return $this->httpPost($url);
return $this->httpPost($url, $params);
}

/**
@@ -62,15 +63,16 @@ class Client extends BaseClient
*/
public function confirm(string $batchNo)
{
$biz_content = [
'batch_no' => $batchNo
];
$params = [
'biz_content' => [
'batch_no' => $batchNo
]
'biz_content' => json_encode($biz_content, JSON_UNESCAPED_UNICODE)
];
$this->method = 'alipay.open.agent.confirm';
$sysParams = $this->buildParams($params);
$url = $this->_toUrlEncodedRequestBody($sysParams);
return $this->httpPost($url);
return $this->httpPost($url, $params);
}

/**
@@ -84,16 +86,16 @@ class Client extends BaseClient
*/
public function query(string $batchNo)
{
$biz_content = [
'batch_no' => $batchNo
];
$params = [
'method' => $this->method,
'biz_content' => [
'batch_no' => $batchNo
]
'biz_content' => json_encode($biz_content, JSON_UNESCAPED_UNICODE)
];
$this->method = 'alipay.open.agent.confirm';
$sysParams = $this->buildParams($params);
$url = $this->_toUrlEncodedRequestBody($sysParams);
return $this->httpPost($url);
return $this->httpPost($url, $params);
}

/**
@@ -107,14 +109,15 @@ class Client extends BaseClient
*/
public function cancel(string $batchNo)
{
$biz_content = [
'batch_no' => $batchNo
];
$params = [
'biz_content' => [
'batch_no' => $batchNo
]
'biz_content' => json_encode($biz_content, JSON_UNESCAPED_UNICODE)
];
$this->method = 'alipay.open.agent.cancel';
$sysParams = $this->buildParams($params);
$url = $this->_toUrlEncodedRequestBody($sysParams);
return $this->httpPost($url);
return $this->httpPost($url, $params);
}
}

+ 3
- 3
src/OpenPlatform/Authorizer/Mini/BaseInfo/Client.php View File

@@ -36,10 +36,10 @@ class Client extends BaseClient
*/
public function modify(array $payload)
{
$params = [];
$params = $payload;
$this->method = 'alipay.open.mini.baseinfo.modify';
$sysParams = $this->buildParams($params);
$url = $this->_toUrlEncodedRequestBody($sysParams, $payload);
return $this->httpPost($url);
$url = $this->_toUrlEncodedRequestBody($sysParams);
return $this->httpPost($url, $params);
}
}

+ 3
- 4
src/OpenPlatform/Authorizer/Mini/Category/Client.php View File

@@ -16,14 +16,13 @@ class Client extends BaseClient
*/
public function query(bool $isFilter = true)
{
$biz_content = ['is_filter' => $isFilter];
$params = [
'biz_content' => [
'is_filter' => $isFilter
]
'biz_content' => json_encode($biz_content, JSON_UNESCAPED_UNICODE)
];
$this->method = 'alipay.open.mini.category.query';
$sysParams = $this->buildParams($params);
$url = $this->_toUrlEncodedRequestBody($sysParams);
return $this->httpPost($url);
return $this->httpPost($url, $params);
}
}

+ 10
- 8
src/OpenPlatform/Authorizer/Mini/Domain/Client.php View File

@@ -16,15 +16,16 @@ class Client extends BaseClient
*/
public function create(string $safeDomain)
{
$biz_content = [
'safe_domain' => $safeDomain
];
$params = [
'biz_content' => [
'safe_domain' => $safeDomain
]
'biz_content' => json_encode($biz_content, JSON_UNESCAPED_UNICODE)
];
$this->method = 'alipay.open.mini.safedomain.create';
$sysParams = $this->buildParams($params);
$url = $this->_toUrlEncodedRequestBody($sysParams);
return $this->httpPost($url);
return $this->httpPost($url, $params);
}

/**
@@ -36,14 +37,15 @@ class Client extends BaseClient
*/
public function delete(string $safeDomain)
{
$biz_content = [
'safe_domain' => $safeDomain
];
$params = [
'biz_content' => [
'safe_domain' => $safeDomain
]
'biz_content' => json_encode($biz_content, JSON_UNESCAPED_UNICODE)
];
$this->method = 'alipay.open.mini.safedomain.delete';
$sysParams = $this->buildParams($params);
$url = $this->_toUrlEncodedRequestBody($sysParams);
return $this->httpPost($url);
return $this->httpPost($url, $params);
}
}

+ 18
- 15
src/OpenPlatform/Authorizer/Mini/Experience/Client.php View File

@@ -16,16 +16,17 @@ class Client extends BaseClient
*/
public function create(string $appVersion, string $bundleId = 'com.alipay.alipaywallet')
{
$biz_content = [
'app_version' => $appVersion,
'bundle_id' => $bundleId,
];
$params = [
'biz_content' => [
'app_version' => $appVersion,
'bundle_id' => $bundleId,
]
'biz_content' => json_encode($biz_content, JSON_UNESCAPED_UNICODE)
];
$this->method = 'alipay.open.mini.experience.create';
$sysParams = $this->buildParams($params);
$url = $this->_toUrlEncodedRequestBody($sysParams);
return $this->httpPost($url);
return $this->httpPost($url, $params);
}

/**
@@ -40,16 +41,17 @@ class Client extends BaseClient
*/
public function query(string $appVersion, string $bundleId = 'com.alipay.alipaywallet')
{
$biz_content = [
'app_version' => $appVersion,
'bundle_id' => $bundleId,
];
$params = [
'biz_content' => [
'app_version' => $appVersion,
'bundle_id' => $bundleId,
]
'biz_content' => json_encode($biz_content, JSON_UNESCAPED_UNICODE)
];
$this->method = 'alipay.open.mini.experience.query';
$sysParams = $this->buildParams($params);
$url = $this->_toUrlEncodedRequestBody($sysParams);
return $this->httpPost($url);
return $this->httpPost($url, $params);
}

/**
@@ -63,15 +65,16 @@ class Client extends BaseClient
*/
public function cancel(string $appVersion, string $bundleId = 'com.alipay.alipaywallet')
{
$biz_content = [
'app_version' => $appVersion,
'bundle_id' => $bundleId,
];
$params = [
'biz_content' => [
'app_version' => $appVersion,
'bundle_id' => $bundleId,
]
'biz_content' => json_encode($biz_content, JSON_UNESCAPED_UNICODE)
];
$this->method = 'alipay.open.mini.experience.cancel';
$sysParams = $this->buildParams($params);
$url = $this->_toUrlEncodedRequestBody($sysParams);
return $this->httpPost($url);
return $this->httpPost($url, $params);
}
}

+ 17
- 18
src/OpenPlatform/Authorizer/Mini/Members/Client.php View File

@@ -17,18 +17,17 @@ class Client extends BaseClient
*/
public function create(string $logonId, string $role = 'DEVELOPER')
{
$biz_content = [
'logon_id' => $logonId,
'role' => $role,
];
$params = [
'params' => [
'biz_content' => [
'logon_id' => $logonId,
'role' => $role,
]
]
'biz_content' => json_encode($biz_content, JSON_UNESCAPED_UNICODE)
];
$this->method = 'alipay.open.app.members.create';
$sysParams = $this->buildParams($params);
$url = $this->_toUrlEncodedRequestBody($sysParams);
return $this->httpPost($url);
return $this->httpPost($url, $params);
}

/**
@@ -40,17 +39,16 @@ class Client extends BaseClient
*/
public function query(string $role = 'DEVELOPER')
{
$biz_content = [
'role' => $role,
];
$params = [
'params' => [
'biz_content' => [
'role' => $role,
]
]
'biz_content' => json_encode($biz_content, JSON_UNESCAPED_UNICODE)
];
$this->method = 'alipay.open.app.members.query';
$sysParams = $this->buildParams($params);
$url = $this->_toUrlEncodedRequestBody($sysParams);
return $this->httpPost($url);
return $this->httpPost($url, $params);
}

/**
@@ -63,15 +61,16 @@ class Client extends BaseClient
*/
public function delete(string $userId, string $role = 'DEVELOPER')
{
$biz_content = [
'user_id' => $userId,
'role' => $role,
];
$params = [
'biz_content' => [
'user_id' => $userId,
'role' => $role,
]
'biz_content' => json_encode($biz_content, JSON_UNESCAPED_UNICODE)
];
$this->method = 'alipay.open.app.members.delete';
$sysParams = $this->buildParams($params);
$url = $this->_toUrlEncodedRequestBody($sysParams);
return $this->httpPost($url);
return $this->httpPost($url, $params);
}
}

+ 44
- 41
src/OpenPlatform/Authorizer/Mini/Version/Client.php View File

@@ -35,18 +35,17 @@ class Client extends BaseClient
*/
public function query(string $appVersion, string $bundleId = 'com.alipay.alipaywallet')
{
$biz_content = [
'app_version' => $appVersion,
'bundle_id' => $bundleId
];
$params = [
'params' => [
'biz_content' => [
'app_version' => $appVersion,
'bundle_id' => $bundleId
]
]
'biz_content' => json_encode($biz_content, JSON_UNESCAPED_UNICODE)
];
$this->method = 'alipay.open.mini.version.detail.query';
$sysParams = $this->buildParams($params);
$url = $this->_toUrlEncodedRequestBody($sysParams);
return $this->httpPost($url);
return $this->httpPost($url, $params);
}

/**
@@ -67,14 +66,12 @@ class Client extends BaseClient
'bundle_id' => $bundle_id,
], $payload);
$params = [
'params' => [
'biz_content' => $biz_content
]
'biz_content' => json_encode($biz_content, JSON_UNESCAPED_UNICODE)
];
$this->method = 'alipay.open.mini.version.upload';
$sysParams = $this->buildParams($params);
$url = $this->_toUrlEncodedRequestBody($sysParams);
return $this->httpPost($url);
return $this->httpPost($url, $params);
}

/**
@@ -121,16 +118,17 @@ class Client extends BaseClient
*/
public function online(string $appVersion, string $bundleId = 'com.alipay.alipaywallet')
{
$biz_content = [
'app_version' => $appVersion,
'bundle_id' => $bundleId,
];
$params = [
'biz_content' => [
'app_version' => $appVersion,
'bundle_id' => $bundleId,
]
'biz_content' => json_encode($biz_content, JSON_UNESCAPED_UNICODE)
];
$this->method = 'alipay.open.mini.version.online';
$sysParams = $this->buildParams($params);
$url = $this->_toUrlEncodedRequestBody($sysParams);
return $this->httpPost($url);
return $this->httpPost($url, $params);
}

/**
@@ -144,16 +142,17 @@ class Client extends BaseClient
*/
public function offline(string $appVersion, string $bundleId = 'com.alipay.alipaywallet')
{
$biz_content = [
'app_version' => $appVersion,
'bundle_id' => $bundleId,
];
$params = [
'biz_content' => [
'app_version' => $appVersion,
'bundle_id' => $bundleId,
]
'biz_content' => json_encode($biz_content, JSON_UNESCAPED_UNICODE)
];
$this->method = 'alipay.open.mini.version.offline';
$sysParams = $this->buildParams($params);
$url = $this->_toUrlEncodedRequestBody($sysParams);
return $this->httpPost($url);
return $this->httpPost($url, $params);
}

/**
@@ -166,16 +165,17 @@ class Client extends BaseClient
*/
public function cancel(string $appVersion, string $bundleId = 'com.alipay.alipaywallet')
{
$biz_content = [
'app_version' => $appVersion,
'bundle_id' => $bundleId,
];
$params = [
'biz_content' => [
'app_version' => $appVersion,
'bundle_id' => $bundleId,
]
'biz_content' => json_encode($biz_content, JSON_UNESCAPED_UNICODE)
];
$this->method = 'alipay.open.mini.version.audited.cancel';
$sysParams = $this->buildParams($params);
$url = $this->_toUrlEncodedRequestBody($sysParams);
return $this->httpPost($url);
return $this->httpPost($url, $params);
}

/**
@@ -189,16 +189,17 @@ class Client extends BaseClient
*/
public function auditCancel(string $appVersion, string $bundleId = 'com.alipay.alipaywallet')
{
$biz_content = [
'app_version' => $appVersion,
'bundle_id' => $bundleId,
];
$params = [
'biz_content' => [
'app_version' => $appVersion,
'bundle_id' => $bundleId,
]
'biz_content' => json_encode($biz_content, JSON_UNESCAPED_UNICODE)
];
$this->method = 'alipay.open.mini.version.audit.cancel';
$sysParams = $this->buildParams($params);
$url = $this->_toUrlEncodedRequestBody($sysParams);
return $this->httpPost($url);
return $this->httpPost($url, $params);
}

/**
@@ -212,16 +213,17 @@ class Client extends BaseClient
*/
public function rollback(string $appVersion, string $bundleId = 'com.alipay.alipaywallet')
{
$biz_content = [
'app_version' => $appVersion,
'bundle_id' => $bundleId,
];
$params = [
'biz_content' => [
'app_version' => $appVersion,
'bundle_id' => $bundleId,
]
'biz_content' => json_encode($biz_content, JSON_UNESCAPED_UNICODE)
];
$this->method = 'alipay.open.mini.version.rollback';
$sysParams = $this->buildParams($params);
$url = $this->_toUrlEncodedRequestBody($sysParams);
return $this->httpPost($url);
return $this->httpPost($url, $params);
}

/**
@@ -236,15 +238,16 @@ class Client extends BaseClient
*/
public function delete(string $appVersion, string $bundleId = 'com.alipay.alipaywallet')
{
$biz_content = [
'app_version' => $appVersion,
'bundle_id' => $bundleId,
];
$params = [
'biz_content' => [
'app_version' => $appVersion,
'bundle_id' => $bundleId,
]
'biz_content' => json_encode($biz_content, JSON_UNESCAPED_UNICODE)
];
$this->method = 'alipay.open.mini.version.delete';
$sysParams = $this->buildParams($params);
$url = $this->_toUrlEncodedRequestBody($sysParams);
return $this->httpPost($url);
return $this->httpPost($url, $params);
}
}

+ 12
- 10
src/OpenPlatform/Base/Client.php View File

@@ -18,17 +18,18 @@ class Client extends BaseClient
*/
public function getToken(string $grant_type, string $code, string $refresh_token = '')
{
$biz_content = [
'grant_type' => $grant_type,
'code' => $code,
'refresh_token' => $refresh_token,
];
$params = [
'biz_content' => [
'grant_type' => $grant_type,
'code' => $code,
'refresh_token' => $refresh_token,
]
'biz_content' => json_encode($biz_content, JSON_UNESCAPED_UNICODE)
];
$this->method = 'alipay.open.auth.token.app';
$sysParams = $this->buildParams($params);
$url = $this->_toUrlEncodedRequestBody($sysParams);
return $this->httpPost($url);
return $this->httpPost($url, $params);
}

/**
@@ -61,14 +62,15 @@ class Client extends BaseClient
*/
public function queryAppAuth($appAuthToken)
{
$biz_content = [
'app_auth_token' => $appAuthToken
];
$params = [
'biz_content' => [
'app_auth_token' => $appAuthToken
]
'biz_content' => json_encode($biz_content, JSON_UNESCAPED_UNICODE)
];
$this->method = 'alipay.open.auth.token.app.query';
$sysParams = $this->buildParams($params);
$url = $this->_toUrlEncodedRequestBody($sysParams);
return $this->httpPost($url);
return $this->httpPost($url, $params);
}
}

+ 26
- 23
src/OpenPublic/Message/Client.php View File

@@ -25,12 +25,12 @@ class Client extends BaseClient
'content' => $content
], $payload);
$params = [
'biz_content' => $biz_content
'biz_content' => json_encode($biz_content, JSON_UNESCAPED_UNICODE)
];
$this->method = 'alipay.open.public.message.content.create';
$sysParams = $this->buildParams($params);
$url = $this->_toUrlEncodedRequestBody($sysParams);
return $this->httpPost($url);
return $this->httpPost($url, $params);
}

/**
@@ -53,12 +53,12 @@ class Client extends BaseClient
'content' => $content
], $payload);
$params = [
'biz_content' => $biz_content
'biz_content' => json_encode($biz_content, JSON_UNESCAPED_UNICODE)
];
$this->method = 'alipay.open.public.message.content.modify';
$sysParams = $this->buildParams($params);
$url = $this->_toUrlEncodedRequestBody($sysParams);
return $this->httpPost($url);
return $this->httpPost($url, $params);
}

/**
@@ -71,17 +71,17 @@ class Client extends BaseClient
*/
public function sendText(string $text)
{

$biz_content = [
'msg_type' => 'text',
'text' => $text
];
$params = [
'biz_content' => [
'msg_type' => 'text',
'text' => $text
]
'biz_content' => json_encode($biz_content, JSON_UNESCAPED_UNICODE)
];
$this->method = 'alipay.open.public.message.total.send';
$sysParams = $this->buildParams($params);
$url = $this->_toUrlEncodedRequestBody($sysParams);
return $this->httpPost($url);
return $this->httpPost($url, $params);
}

/**
@@ -94,16 +94,17 @@ class Client extends BaseClient
*/
public function sendImageText(string $articles)
{
$biz_content = [
'msg_type' => 'image-text',
'articles' => $articles
];
$params = [
'biz_content' => [
'msg_type' => 'image-text',
'articles' => $articles
]
'biz_content' => json_encode($biz_content, JSON_UNESCAPED_UNICODE)
];
$this->method = 'alipay.open.public.message.total.send';
$sysParams = $this->buildParams($params);
$url = $this->_toUrlEncodedRequestBody($sysParams);
return $this->httpPost($url);
return $this->httpPost($url, $params);
}

/**
@@ -116,15 +117,16 @@ class Client extends BaseClient
*/
public function query(array $message_ids)
{
$biz_content = [
'message_ids' => $message_ids
];
$params = [
'biz_content' => [
'message_ids' => $message_ids
]
'biz_content' => json_encode($biz_content, JSON_UNESCAPED_UNICODE)
];
$this->method = 'alipay.open.public.message.query';
$sysParams = $this->buildParams($params);
$url = $this->_toUrlEncodedRequestBody($sysParams);
return $this->httpPost($url);
return $this->httpPost($url, $params);
}

/**
@@ -136,14 +138,15 @@ class Client extends BaseClient
*/
public function recall(string $message_id)
{
$biz_content = [
'message_id' => $message_id
];
$params = [
'biz_content' => [
'message_id' => $message_id
]
'biz_content' => json_encode($biz_content, JSON_UNESCAPED_UNICODE)
];
$this->method = 'alipay.open.public.life.msg.recall';
$sysParams = $this->buildParams($params);
$url = $this->_toUrlEncodedRequestBody($sysParams);
return $this->httpPost($url);
return $this->httpPost($url, $params);
}
}

+ 13
- 11
src/OpenPublic/Template/Client.php View File

@@ -19,18 +19,19 @@ class Client extends BaseClient
*/
public function setIndustry(string $primary_industry_name, string $primary_industry_code, string $secondary_industry_code, string $secondary_industry_name)
{
$biz_content = [
'primary_industry_name' => $primary_industry_name,
'primary_industry_code' => $primary_industry_code,
'secondary_industry_code' => $secondary_industry_code,
'secondary_industry_name' => $secondary_industry_name
];
$params = [
'biz_content' => [
'primary_industry_name' => $primary_industry_name,
'primary_industry_code' => $primary_industry_code,
'secondary_industry_code' => $secondary_industry_code,
'secondary_industry_name' => $secondary_industry_name
]
'biz_content' => json_encode($biz_content, JSON_UNESCAPED_UNICODE)
];
$this->method = 'alipay.open.public.template.message.industry.modify';
$sysParams = $this->buildParams($params);
$url = $this->_toUrlEncodedRequestBody($sysParams);
return $this->httpPost($url);
return $this->httpPost($url, $params);
}

/**
@@ -60,14 +61,15 @@ class Client extends BaseClient
*/
public function getTemplate(string $template_id)
{
$biz_content = [
'template_id' => $template_id
];
$params = [
'biz_content' => [
'template_id' => $template_id
]
'biz_content' => json_encode($biz_content, JSON_UNESCAPED_UNICODE)
];
$this->method = 'alipay.open.public.template.message.get';
$sysParams = $this->buildParams($params);
$url = $this->_toUrlEncodedRequestBody($sysParams);
return $this->httpPost($url);
return $this->httpPost($url, $params);
}
}

+ 5
- 4
src/Payment/Fund/Client.php View File

@@ -16,14 +16,15 @@ class Client extends BaseClient
*/
public function transfer(array $payload)
{
$biz_content = [
'out_trade_no' => $payload
];
$params = [
'biz_content' => [
'out_trade_no' => $payload
]
'biz_content' => json_encode($biz_content, JSON_UNESCAPED_UNICODE)
];
$this->method = 'alipay.fund.trans.uni.transfer';
$sysParams = $this->buildParams($params);
$url = $this->_toUrlEncodedRequestBody($sysParams);
return $this->httpPost($url);
return $this->httpPost($url, $params);
}
}

+ 17
- 14
src/Payment/Order/Client.php View File

@@ -16,15 +16,16 @@ class Client extends BaseClient
*/
public function close(string $out_trade_no)
{
$biz_content = [
'out_trade_no' => $out_trade_no
];
$params = [
'biz_content' => [
'out_trade_no' => $out_trade_no
]
'biz_content' => json_encode($biz_content, JSON_UNESCAPED_UNICODE)
];
$this->method = 'alipay.trade.close';
$sysParams = $this->buildParams($params);
$url = $this->_toUrlEncodedRequestBody($sysParams);
return $this->httpPost($url);
return $this->httpPost($url, $params);
}

/**
@@ -37,15 +38,16 @@ class Client extends BaseClient
*/
public function cancel(string $out_trade_no)
{
$biz_content = [
'out_trade_no' => $out_trade_no
];
$params = [
'biz_content' => [
'out_trade_no' => $out_trade_no
]
'biz_content' => json_encode($biz_content, JSON_UNESCAPED_UNICODE)
];
$this->method = 'alipay.trade.cancel';
$sysParams = $this->buildParams($params);
$url = $this->_toUrlEncodedRequestBody($sysParams);
return $this->httpPost($url);
return $this->httpPost($url, $params);
}

/**
@@ -58,15 +60,16 @@ class Client extends BaseClient
*/
public function query(string $out_trade_no)
{
$biz_content = [
'out_trade_no' => $out_trade_no
];
$params = [
'biz_content' => [
'out_trade_no' => $out_trade_no
]
'biz_content' => json_encode($biz_content, JSON_UNESCAPED_UNICODE)
];
$this->method = 'alipay.trade.query';
$sysParams = $this->buildParams($params);
$url = $this->_toUrlEncodedRequestBody($sysParams);
return $this->httpPost($url);
return $this->httpPost($url, $params);
}

/**
@@ -91,11 +94,11 @@ class Client extends BaseClient
$biz_content['out_request_no'] = $out_request_no;
}
$params = [
'biz_content' => $biz_content
'biz_content' => json_encode($biz_content, JSON_UNESCAPED_UNICODE)
];
$this->method = 'alipay.trade.refund';
$sysParams = $this->buildParams($params);
$url = $this->_toUrlEncodedRequestBody($sysParams);
return $this->httpPost($url);
return $this->httpPost($url, $params);
}
}

+ 12
- 12
src/Payment/Pay/Client.php View File

@@ -17,12 +17,12 @@ class Client extends BaseClient
public function pos(array $payload)
{
$params = [
'biz_content' => $payload
'biz_content' => json_encode($payload, JSON_UNESCAPED_UNICODE)
];
$this->method = 'alipay.trade.pay';
$sysParams = $this->buildParams($params);
$url = $this->_toUrlEncodedRequestBody($sysParams);
return $this->httpPost($url);
return $this->httpPost($url, $params);
}

/**
@@ -36,12 +36,12 @@ class Client extends BaseClient
public function app(array $payload)
{
$params = [
'biz_content' => $payload
'biz_content' => json_encode($payload, JSON_UNESCAPED_UNICODE)
];
$this->method = 'alipay.trade.app.pay';
$sysParams = $this->buildParams($params);
$url = $this->_toUrlEncodedRequestBody($sysParams);
return $this->httpPost($url);
return $this->httpPost($url, $params);
}

/**
@@ -55,12 +55,12 @@ class Client extends BaseClient
public function mini(array $payload)
{
$params = [
'biz_content' => $payload
'biz_content' => json_encode($payload, JSON_UNESCAPED_UNICODE)
];
$this->method = 'alipay.trade.create';
$sysParams = $this->buildParams($params);
$url = $this->_toUrlEncodedRequestBody($sysParams);
return $this->httpPost($url);
return $this->httpPost($url, $params);
}

/**
@@ -74,12 +74,12 @@ class Client extends BaseClient
public function scan(array $payload)
{
$params = [
'biz_content' => $payload
'biz_content' => json_encode($payload, JSON_UNESCAPED_UNICODE)
];
$this->method = 'alipay.trade.precreate';
$sysParams = $this->buildParams($params);
$url = $this->_toUrlEncodedRequestBody($sysParams);
return $this->httpPost($url);
return $this->httpPost($url, $params);
}

/**
@@ -94,12 +94,12 @@ class Client extends BaseClient
{
$payload['product_code'] = 'QUICK_WAP_WAY';
$params = [
'biz_content' => $payload
'biz_content' => json_encode($payload, JSON_UNESCAPED_UNICODE)
];
$this->method = 'alipay.trade.wap.pay';
$sysParams = $this->buildParams($params);
$url = $this->_toUrlEncodedRequestBody($sysParams);
return $this->httpPost($url);
return $this->httpPost($url, $params);
}

/**
@@ -113,11 +113,11 @@ class Client extends BaseClient
{
$payload['product_code'] = 'FAST_INSTANT_TRADE_PAY';
$params = [
'biz_content' => $payload
'biz_content' => json_encode($payload, JSON_UNESCAPED_UNICODE)
];
$this->method = 'alipay.trade.page.pay';
$sysParams = $this->buildParams($params);
$url = $this->_toUrlEncodedRequestBody($sysParams);
return $this->httpPost($url);
return $this->httpPost($url, $params);
}
}

Loading…
Cancel
Save