Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Order对象的$attributes中不能传入device_info参数 #1030

Closed
zfuming opened this issue Nov 16, 2017 · 0 comments
Closed

Order对象的$attributes中不能传入device_info参数 #1030

zfuming opened this issue Nov 16, 2017 · 0 comments

Comments

@zfuming
Copy link

zfuming commented Nov 16, 2017

我的使用方式:

$options = [
  'app_id'  => $appid,
  'payment' => [
    'merchant_id'     => $mch_id,
    'key'             => $key,
    'cert_path'       => $cert_path,
    'key_path'        => $key_path,
    'sub_app_id'      => $sub_appid,
    'sub_merchant_id' => $sub_mch_id,
  ],
];
$app     = new Application($options);
$gateway = $app->payment;
$attributes = [
  'auth_code'    => $auth_code,
  'body'         => $body,
  'out_trade_no' => $order_id,
  'device_info'  => $device_info,
  'total_fee'    => $total_fee,
  'fee_type'     => $fee_type
];
$wechat_order = new Order($attributes);
$response     = $gateway->pay($wechat_order);
  • 这里$attributes 里面的device_info会失效
  • 应为我的device_info是用作store_id,我每一家门店一个store_id,但是我的配置信息都相同,我希望在Order里面能传入device_info,而不是在配置的$options中传入device_info
@zfuming zfuming closed this as completed Nov 16, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant