Merge branch 'master' of github.com:yansongda/pay

This commit is contained in:
yansongda 2019-05-12 22:44:12 +08:00
commit 1ef934e28f
2 changed files with 11 additions and 4 deletions

View File

@ -181,9 +181,9 @@ class Alipay implements GatewayApplicationInterface
* @param string $type
* @param bool $transfer @deprecated since v2.7.3
*
* @throws InvalidSignException
* @throws GatewayException
* @throws InvalidConfigException
* @throws InvalidSignException
*
* @return Collection
*/
@ -196,6 +196,13 @@ class Alipay implements GatewayApplicationInterface
$type = $type === true ? 'refund' : 'transfer';
}
if ($type === false) {
Log::warning('DEPRECATED: In Alipay->find(), the REFUND/TRANSFER param is deprecated since v2.7.3, use TYPE param instead!');
@trigger_error('In yansongda/pay Alipay->find(), the REFUND/TRANSFER param is deprecated since v2.7.3, use TYPE param instead!', E_USER_DEPRECATED);
$type = 'wap';
}
$gateway = get_class($this).'\\'.Str::studly($type).'Gateway';
if (!class_exists($gateway) || !is_callable([new $gateway(), 'find'])) {
@ -242,7 +249,7 @@ class Alipay implements GatewayApplicationInterface
*
* @author yansongda <me@yansongda.cn>
*
* @param string|array $order
* @param array $order
*
* @throws GatewayException
* @throws InvalidConfigException
@ -292,9 +299,9 @@ class Alipay implements GatewayApplicationInterface
*
* @param string|array $bill
*
* @throws GatewayException
* @throws InvalidConfigException
* @throws InvalidSignException
* @throws GatewayException
*
* @return string
*/

View File

@ -74,7 +74,7 @@ class WebGateway implements GatewayInterface
return RedirectResponse::create($endpoint.'?'.http_build_query($payload));
}
$sHtml = "<form id='alipay_submit' name='alipay_submit' action='".$endpoint."' method='.$method.'>";
$sHtml = "<form id='alipay_submit' name='alipay_submit' action='".$endpoint."' method='".$method."'>";
foreach ($payload as $key => $val) {
$val = str_replace("'", '&apos;', $val);
$sHtml .= "<input type='hidden' name='".$key."' value='".$val."'/>";