APP场景预签约
商户可调用本接口预先指定签约,生成预签约会话及对应的预签约ID,再携带预签约ID(pre_entrustweb_id)参数,通过微信SDK拉起微信支付客户端的签约页面。
请求参数 | 类型 | 描述 |
---|---|---|
json | object | 声明请求的JSON 数据结构 |
appid | string | 签约和付款的AppID |
out_contract_code | string | 业务申请单号 |
php
$instance->v3->ecommerce->individualContracts->preEntrustSign->app->postAsync([
'json' => [
'appid' => 'wxd678efh567h23787',
'out_contract_code' => 'APPLYMENT_00000000001',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance->chain('v3/ecommerce/individual-contracts/pre-entrust-sign/app')->postAsync([
'json' => [
'appid' => 'wxd678efh567h23787',
'out_contract_code' => 'APPLYMENT_00000000001',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance['v3/ecommerce/individual-contracts/pre-entrust-sign/app']->postAsync([
'json' => [
'appid' => 'wxd678efh567h23787',
'out_contract_code' => 'APPLYMENT_00000000001',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$response = $instance->v3->ecommerce->individualContracts->preEntrustSign->app->post([
'json' => [
'appid' => 'wxd678efh567h23787',
'out_contract_code' => 'APPLYMENT_00000000001',
],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance->chain('v3/ecommerce/individual-contracts/pre-entrust-sign/app')->post([
'json' => [
'appid' => 'wxd678efh567h23787',
'out_contract_code' => 'APPLYMENT_00000000001',
],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance['v3/ecommerce/individual-contracts/pre-entrust-sign/app']->post([
'json' => [
'appid' => 'wxd678efh567h23787',
'out_contract_code' => 'APPLYMENT_00000000001',
],
]);
print_r(json_decode((string) $response->getBody(), true));
返回字典 | 类型 | 描述 |
---|---|---|
pre_entrustweb_id | string | 预签约id |
参阅 官方文档