Skip to content

Commit

Permalink
Merge pull request #134 from leo108/master
Browse files Browse the repository at this point in the history
调用支付宝时支持覆盖回调地址
  • Loading branch information
yansongda committed Jul 29, 2018
2 parents 0eb7abc + a8113ec commit c9f57c8
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/Gateways/Alipay.php
Expand Up @@ -83,6 +83,12 @@ public function __construct(Config $config)
*/
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';
Expand Down

0 comments on commit c9f57c8

Please sign in to comment.