调用支付宝时支持覆盖回调地址

This commit is contained in:
leo108 2018-07-29 11:33:29 +08:00
parent 0eb7abcc76
commit a8113ec013

View File

@ -83,6 +83,12 @@ class Alipay implements GatewayApplicationInterface
*/
public function pay($gateway, $params = [])
{
foreach (['return_url', 'notify_url'] as $field) {
if (isset($params[$field])) {
$this->payload[$field] = $params[$field];
unset($params[$field]);
}
}
$this->payload['biz_content'] = json_encode($params);
$gateway = get_class($this).'\\'.Str::studly($gateway).'Gateway';