This commit is contained in:
yansongda 2018-01-13 16:17:04 +08:00
parent cef9a39bc2
commit df401f7cef
2 changed files with 3 additions and 2 deletions

View File

@ -65,7 +65,6 @@ class Support
self::toXml($data),
($certClient !== null && $certKey !== null) ? ['cert' => $certClient, 'ssl_key' => $certKey] : []
);
$result = is_array($result) ? $result : self::fromXml($result);
if (!isset($result['return_code']) || $result['return_code'] != 'SUCCESS' || $result['result_code'] != 'SUCCESS') {
@ -76,7 +75,7 @@ class Support
);
}
if (self::generateSign($result, $key) === $result['sign']) {
if (self::generateSign($result, $key) === $result['sign'] || $endpoint === 'mmpaymkttransfers/promotion/transfers') {
return new Collection($result);
}

View File

@ -26,6 +26,8 @@ class TransferGateway extends Gateway
unset($payload['appid'], $payload['mch_id'], $payload['trade_type'], $payload['notify_url']);
$payload['sign'] = Support::generateSign($payload, $this->config->get('key'));
Log::debug('Paying A Transfer Order:', [$endpoint, $payload]);
return Support::requestApi(