Browse Source

test

master
用户名 3 years ago
parent
commit
d7fa910fe0
  1. 60
      mobile/source/helpers/dalianpay/demo/dalianpay.php
  2. 4
      mobile/source/helpers/test_dalianpay/demo/dalianpay.php

60
mobile/source/helpers/dalianpay/demo/dalianpay.php

@ -66,45 +66,47 @@ class dalianpay{
// echo "\r\n"; // echo "\r\n";
// var_dump(uniqid($reqsn_prefix)); // var_dump(uniqid($reqsn_prefix));
// $trade_data = array(
// 'orgid' => $config['org_num'],
// 'cusid' => $config['cusid'],
// 'branchno' => $config['branchno'],
// // 'termcode' => $config['termcode'],
// 'version' => $config['version'],
// 'trxamt' => $trxamt, // total_fee
// 'reqsn' => $reqsn, // 交易订单号
// 'producp' => $config['producp'],
// 'transtype' => $config['transtype'], // 微信支付
// 'paytype' => $config['paytype'], // 微信js支付
// 'randomstr' => md5( uniqid() ),
// // 'body' => 'pages',
// // 'acct' => $openid,
// // 'notify_url' => '', // 交易结果通知地址
// // 'sub_appid' => 'wx79343915f99167e6',
// // 'front_url' => '', // 支付完成跳转
// );
echo "reqsn is " . $reqsn . "\n\r"; echo "reqsn is " . $reqsn . "\n\r";
echo "uniqid reqsn is " . uniqid($reqsn_prefix) . "\n\r"; echo "uniqid reqsn is " . uniqid($reqsn_prefix) . "\n\r";
$trade_data = array( $trade_data = array(
'orgid' => '5503001', 'orgid' => $config['org_num'],
'cusid' => '10147', 'cusid' => $config['cusid'],
'branchno' => '44', 'branchno' => $config['branchno'],
// 'termcode' => $config['termcode'], // 'termcode' => $config['termcode'],
'version' => '11', 'version' => $config['version'],
'trxamt' => '600', // total_fee 'trxamt' => $trxamt, // total_fee
// 'reqsn' => uniqid($reqsn_prefix), // 交易订单号 // 'reqsn' => $reqsn, // 交易订单号
'reqsn' => $reqsn, // 交易订单号 'reqsn' => uniqid($reqsn_prefix), // 交易订单号
'producp' => 'JX0002', 'producp' => $config['producp'],
'transtype' => 'JSP501', // 微信支付 'transtype' => $config['transtype'], // 微信支付
'paytype' => 'W02', // 微信js支付 'paytype' => $config['paytype'], // 微信js支付
'randomstr' => md5( uniqid() ), 'randomstr' => md5( uniqid() ),
// 'body' => 'pages', // 'body' => 'pages',
'acct' => $openid, // 'acct' => $openid,
// 'notify_url' => '', // 交易结果通知地址 // 'notify_url' => '', // 交易结果通知地址
// 'sub_appid' => 'wx79343915f99167e6', // 'sub_appid' => 'wx79343915f99167e6',
// 'front_url' => '', // 支付完成跳转 // 'front_url' => '', // 支付完成跳转
); );
// $trade_data = array(
// 'orgid' => '5503001',
// 'cusid' => '10147',
// 'branchno' => '44',
// // 'termcode' => $config['termcode'],
// 'version' => '11',
// 'trxamt' => '600', // total_fee
// // 'reqsn' => uniqid($reqsn_prefix), // 交易订单号
// 'reqsn' => $reqsn, // 交易订单号
// 'producp' => 'JX0002',
// 'transtype' => 'JSP501', // 微信支付
// 'paytype' => 'W02', // 微信js支付
// 'randomstr' => md5( uniqid() ),
// // 'body' => 'pages',
// 'acct' => $openid,
// // 'notify_url' => '', // 交易结果通知地址
// // 'sub_appid' => 'wx79343915f99167e6',
// // 'front_url' => '', // 支付完成跳转
// );
// 生成签名 // 生成签名
$sign = $Base->Crypt->makeSign($trade_data); $sign = $Base->Crypt->makeSign($trade_data);

4
mobile/source/helpers/test_dalianpay/demo/dalianpay.php

@ -94,8 +94,8 @@ class dalianpay{
// 'termcode' => $config['termcode'], // 'termcode' => $config['termcode'],
'version' => '11', 'version' => '11',
'trxamt' => '600', // total_fee 'trxamt' => '600', // total_fee
// 'reqsn' => uniqid($reqsn_prefix), // 交易订单号 'reqsn' => uniqid($reqsn_prefix), // 交易订单号
'reqsn' => $reqsn, // 交易订单号 // 'reqsn' => $reqsn, // 交易订单号
'producp' => 'JX0002', 'producp' => 'JX0002',
'transtype' => 'JSP501', // 微信支付 'transtype' => 'JSP501', // 微信支付
'paytype' => 'W02', // 微信js支付 'paytype' => 'W02', // 微信js支付

Loading…
Cancel
Save