Skip to content

教育通扣款受理

扣款受理接口,支付结果以回调为准,或者超时以后主动查单

请求参数类型描述
jsonobject声明请求的JSON数据结构
appidstring服务商APPID
sub_mchidstring子商户号
sub_appidstring子商户APPID
bodystring商品或支付单简要描述
attachstring商户数据
out_trade_nostring商户订单号
goods_tagstring商品标记
notify_urlstring支付回调通知地址
contract_idstring签约协议号
trade_scenestring场景信息枚举
amountobject订单金额
totalinteger总金额
currencystring货币类型
device_informationobject设备信息
device_idstring设备号
device_ipstring商户端设备ip
php
$instance->v3->eduPapay->transactions->postAsync([
  'json' => [
    'appid' => 'wx8888888888888888',
    'sub_mchid' => '1900000109',
    'sub_appid' => 'wx8888888888888888',
    'body' => '新东方-语文课程',
    'attach' => '自定义数据',
    'out_trade_no' => '121775250124070332',
    'goods_tag' => 'test',
    'notify_url' => 'https://www.weixin.qq.com/wxpay/pay',
    'contract_id' => 'wx998877665544wx',
    'trade_scene' => 'EDUCATION_PERIOD',
    'amount' => [
      'total' => 888,
      'currency' => 'CNY',
    ],
    'device_information' => [
      'device_id' => '12343232',
      'device_ip' => '123.12.12.123',
    ],
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r($response->getStatusCode() === 204);
})
->wait();
php
$instance->chain('v3/edu-papay/transactions')->postAsync([
  'json' => [
    'appid' => 'wx8888888888888888',
    'sub_mchid' => '1900000109',
    'sub_appid' => 'wx8888888888888888',
    'body' => '新东方-语文课程',
    'attach' => '自定义数据',
    'out_trade_no' => '121775250124070332',
    'goods_tag' => 'test',
    'notify_url' => 'https://www.weixin.qq.com/wxpay/pay',
    'contract_id' => 'wx998877665544wx',
    'trade_scene' => 'EDUCATION_PERIOD',
    'amount' => [
      'total' => 888,
      'currency' => 'CNY',
    ],
    'device_information' => [
      'device_id' => '12343232',
      'device_ip' => '123.12.12.123',
    ],
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r($response->getStatusCode() === 204);
})
->wait();
php
$instance['v3/edu-papay/transactions']->postAsync([
  'json' => [
    'appid' => 'wx8888888888888888',
    'sub_mchid' => '1900000109',
    'sub_appid' => 'wx8888888888888888',
    'body' => '新东方-语文课程',
    'attach' => '自定义数据',
    'out_trade_no' => '121775250124070332',
    'goods_tag' => 'test',
    'notify_url' => 'https://www.weixin.qq.com/wxpay/pay',
    'contract_id' => 'wx998877665544wx',
    'trade_scene' => 'EDUCATION_PERIOD',
    'amount' => [
      'total' => 888,
      'currency' => 'CNY',
    ],
    'device_information' => [
      'device_id' => '12343232',
      'device_ip' => '123.12.12.123',
    ],
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r($response->getStatusCode() === 204);
})
->wait();
php
$response = $instance->v3->eduPapay->transactions->post([
  'json' => [
    'appid' => 'wx8888888888888888',
    'sub_mchid' => '1900000109',
    'sub_appid' => 'wx8888888888888888',
    'body' => '新东方-语文课程',
    'attach' => '自定义数据',
    'out_trade_no' => '121775250124070332',
    'goods_tag' => 'test',
    'notify_url' => 'https://www.weixin.qq.com/wxpay/pay',
    'contract_id' => 'wx998877665544wx',
    'trade_scene' => 'EDUCATION_PERIOD',
    'amount' => [
      'total' => 888,
      'currency' => 'CNY',
    ],
    'device_information' => [
      'device_id' => '12343232',
      'device_ip' => '123.12.12.123',
    ],
  ],
]);
print_r($response->getStatusCode() === 204);
php
$response = $instance->chain('v3/edu-papay/transactions')->post([
  'json' => [
    'appid' => 'wx8888888888888888',
    'sub_mchid' => '1900000109',
    'sub_appid' => 'wx8888888888888888',
    'body' => '新东方-语文课程',
    'attach' => '自定义数据',
    'out_trade_no' => '121775250124070332',
    'goods_tag' => 'test',
    'notify_url' => 'https://www.weixin.qq.com/wxpay/pay',
    'contract_id' => 'wx998877665544wx',
    'trade_scene' => 'EDUCATION_PERIOD',
    'amount' => [
      'total' => 888,
      'currency' => 'CNY',
    ],
    'device_information' => [
      'device_id' => '12343232',
      'device_ip' => '123.12.12.123',
    ],
  ],
]);
print_r($response->getStatusCode() === 204);
php
$response = $instance['v3/edu-papay/transactions']->post([
  'json' => [
    'appid' => 'wx8888888888888888',
    'sub_mchid' => '1900000109',
    'sub_appid' => 'wx8888888888888888',
    'body' => '新东方-语文课程',
    'attach' => '自定义数据',
    'out_trade_no' => '121775250124070332',
    'goods_tag' => 'test',
    'notify_url' => 'https://www.weixin.qq.com/wxpay/pay',
    'contract_id' => 'wx998877665544wx',
    'trade_scene' => 'EDUCATION_PERIOD',
    'amount' => [
      'total' => 888,
      'currency' => 'CNY',
    ],
    'device_information' => [
      'device_id' => '12343232',
      'device_ip' => '123.12.12.123',
    ],
  ],
]);
print_r($response->getStatusCode() === 204);
返回字典类型描述
空字符串(无返回内容)

参阅 官方文档

Published on the GitHub by TheNorthMemory