Skip to content

查询出境结果

根据微信支付单号+商户出境单号,查询出境结果,出境失败会返回错误码

请求参数类型描述
out_order_idstring商户出境单号
queryobject声明请求的查询参数
sub_mchidstring二级商户号
transaction_idstring微信支付订单号
php
$instance->v3->fundsToOversea->orders->_out_order_id_->getAsync([
  'out_order_id' => 'merchant123123',
  'query' => [
    'sub_mchid'      => '1231231',
    'transaction_id' => '4200000000000',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance->chain('v3/funds-to-oversea/orders/{out_order_id}')->getAsync([
  'out_order_id' => 'merchant123123',
  'query' => [
    'sub_mchid'      => '1231231',
    'transaction_id' => '4200000000000',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance['v3/funds-to-oversea/orders/{out_order_id}']->getAsync([
  'out_order_id' => 'merchant123123',
  'query' => [
    'sub_mchid'      => '1231231',
    'transaction_id' => '4200000000000',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$response = $instance->v3->fundsToOversea->orders->_out_order_id_->get([
  'out_order_id' => 'merchant123123',
  'query' => [
    'sub_mchid'      => '1231231',
    'transaction_id' => '4200000000000',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance->chain('v3/funds-to-oversea/orders/{out_order_id}')->get([
  'out_order_id' => 'merchant123123',
  'query' => [
    'sub_mchid'      => '1231231',
    'transaction_id' => '4200000000000',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance['v3/funds-to-oversea/orders/{out_order_id}']->get([
  'out_order_id' => 'merchant123123',
  'query' => [
    'sub_mchid'      => '1231231',
    'transaction_id' => '4200000000000',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
返回字典类型描述
out_order_idstring商户出境单号
sub_mchidstring二级商户号
order_idstring微信出境单号
resultstring出境结果
fail_reasonstring出境失败的原因
amountinteger请求出境人民币金额
foreign_amountinteger真实出境外币金额
foreign_currencystring外币币种
rateinteger汇率
exchange_rate_timestring购汇时间
estimate_exchange_rate_timestring预计购汇时间
departure_amountinteger真实出境人民币金额
feeinteger手续费人民币金额
charge_mchidstring手续费承担商户号
charge_account_typestring手续费承担账户

参阅 官方文档

Published on the GitHub by TheNorthMemory