韩博深-批量退款查询接口(refund_fastpay_query)(1)
- 格式:pdf
- 大小:524.00 KB
- 文档页数:16
基于thinkphp5框架实现微信⼩程序⽀付退款订单查询退款查询操作微信⼩程序或微信⽀付相关操作⽀付退款订单查询退款查询⽀付成功,进⾏回调退款成功进⾏回调⽤到的⽅法⽀付/*** 预⽀付请求接⼝(POST)* @param string $openid openid* @param string $body 商品简单描述* @param string $order_sn 订单编号* @param string $total_fee ⾦额* @return json的数据*/public function prepay(){tp_log('预⽀付请求数据===>' . json_encode($_POST), 'prepay', request()->controller());$goods_user = db('tf_goods_user')->where(array('order_no' => $_POST['order_no']))->find();$goods = db('tf_goods')->where(array('id' => $goods_user['goods_id']))->find();//判断产品的数量if (($goods['sales_initial'] - $goods['sales_actual']) <= 0) {$return['status'] = 0;$return['info'] = '此产品已售完';exit(json_encode($return));}$order_no = $_POST['order_no']; //订单号$is_sale = $_POST['is_sale'];$openid = $_POST['openid'];$goods_name = $_POST['goods_name'];$pay_price = $_POST['price'];$attach['is_sale'] = $_POST['is_sale'];$attach['sale_id'] = $_POST['sale_id'];$nonce_str = $this->nonce_str();//随机字符串$order_no_ssh = $this->get_orderssh(); //商户订单号//组装⽀付数据$data = ['appid' => config('pay.APPID'),'mch_id' => config('pay.MCHID'),'nonce_str' => $nonce_str,'body' => $goods_name, //商品名称组合'attach' => json_encode($attach),'out_trade_no' => $order_no_ssh,//$order_no, //订单号商户订单号'total_fee' => intval($pay_price * 100),'spbill_create_ip' => $_SERVER['REMOTE_ADDR'],'notify_url' => config('pay.NOTIFY_URL'),'trade_type' => 'JSAPI','openid' => $openid];//订单⽀付表创建订单⽀付数据$p_o_data['createtime'] = time();$p_o_data['order_no'] = $order_no;$p_o_data['order_no_ssh'] = $order_no_ssh;$p_o_data['ready'] = json_encode($data);$p_o_return = db('tf_pay_order')->insert($p_o_data);if(!$p_o_return){//失败$return['status'] = -1;$return['info'] = $p_o_data;exit(json_encode($return));}// 获取签名$sign = $this->makeSign($data);$data['sign'] = $sign;$xml = $this->toXml($data);$url = 'https:///pay/unifiedorder'; //发起⽀付接⼝链接//发起预⽀付请求$prepay_return_reslut_xml = $this->http_request($url, $xml);$xml_to_arr = $this->fromXml($prepay_return_reslut_xml);$return_result = json_encode($xml_to_arr, true);tp_log('预⽀付请求返回数据array===>' .$return_result , 'prepay', request()->controller());//记录预⽀付返回信息db('tf_goods_order')->where(array('order_no' => $order_no))->update(array('go_pay' => $return_result,'updatetime' => time(),'updateuser' => $openid));if($xml_to_arr['return_code'] == 'SUCCESS' && $xml_to_arr['result_code'] == 'SUCCESS'){//成功$time = time();//临时数组⽤于签名$tmp = ['appId' => config('pay.APPID'),'nonceStr' => $nonce_str,'package' => 'prepay_id='.$xml_to_arr['prepay_id'],'signType' => 'MD5','timeStamp' => "$time",];$data['timeStamp'] = "$time";//时间戳$data['nonceStr'] = $nonce_str;//随机字符串$data['signType'] = 'MD5';//签名算法,暂⽀持 MD5$data['package'] = 'prepay_id='.$xml_to_arr['prepay_id'];//统⼀下单接⼝返回的 prepay_id 参数值,提交格式如:prepay_id=*$data['paySign'] = $this->makeSign($tmp);//签名,具体签名⽅案参见微信公众号⽀付帮助⽂档;$data['out_trade_no'] = $out_trade_no; $return['status'] = 1;$return['info'] = $data;}else{//失败$return['status'] = -1;$return['info'] = $xml_to_arr;}exit(json_encode($return));}//curl请求public function http_request($url, $data = null, $headers = array()){$curl = curl_init();if (count($headers) >= 1) {curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);}curl_setopt($curl, CURLOPT_URL, $url);curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, FALSE);curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, FALSE);if (!empty($data)) {curl_setopt($curl, CURLOPT_POST, 1);curl_setopt($curl, CURLOPT_POSTFIELDS, $data);}curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);$output = curl_exec($curl);curl_close($curl);return $output;}退款/*** 申请退款API* @param $transaction_id* @param double $total_fee 账单总⾦额* @param double $refund_fee 退款⾦额* @return bool* @throws BaseException*/public function refund(){$transaction_id = '4200000712202007274705432240';$total_fee = '0.01';$refund_fee = '0.01';// 当前时间$time = time();// ⽣成随机字符串$nonceStr = md5($time . $transaction_id . $total_fee . $refund_fee);// API参数$params = ['appid' => config('pay.APPID'),'mch_id' => config('pay.MCHID'),'nonce_str' => $nonceStr,'transaction_id' => $transaction_id,'out_refund_no' => $time,'total_fee' => $total_fee * 100,'refund_fee' => $refund_fee * 100,'notify_url' => config('pay.NOTIFY_URL_REFUND'),//退款回调地址];// ⽣成签名$params['sign'] = $this->makeSign($params);tp_log('退款请求数据===>' . json_encode($params), 'refund', request()->controller()); // 请求API$url = 'https:///secapi/pay/refund';$result = $this->post($url, $this->toXml($params), true, $this->getCertPem());$prepay = $this->fromXml($result);// 请求失败if (empty($result)) {throw new BaseException(['msg' => '微信退款api请求失败']);}// 格式化返回结果$prepay = $this->fromXml($result);tp_log('退款返回数据===>' . json_encode($prepay), 'refund', request()->controller()); // 请求失败// if ($prepay['return_code'] === 'FAIL') {// throw new BaseException(['msg' => 'return_msg: ' . $prepay['return_msg']]);// }// if ($prepay['result_code'] === 'FAIL') {// throw new BaseException(['msg' => 'err_code_des: ' . $prepay['err_code_des']]); // }return true;}/*** 模拟POST请求* @param $url* @param array $data* @param bool $useCert* @param array $sslCert* @return mixed*/public function post($url, $data = [], $useCert = false, $sslCert = []){$header = ['Content-type: application/json;'];$curl = curl_init();//如果有配置代理这⾥就设置代理// if(WxPayConfig::CURL_PROXY_HOST != "0.0.0.0"// && WxPayConfig::CURL_PROXY_PORT != 0){// curl_setopt($ch,CURLOPT_PROXY, WxPayConfig::CURL_PROXY_HOST);// curl_setopt($ch,CURLOPT_PROXYPORT, WxPayConfig::CURL_PROXY_PORT); // }curl_setopt($curl, CURLOPT_URL, $url);curl_setopt($curl, CURLOPT_HTTPHEADER, $header);curl_setopt($curl, CURLOPT_HEADER, false);curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);curl_setopt($curl, CURLOPT_POST, TRUE);curl_setopt($curl, CURLOPT_POSTFIELDS, $data);if ($useCert == true) {// 设置证书:cert 与 key 分别属于两个.pem⽂件curl_setopt($curl, CURLOPT_SSLCERTTYPE, 'PEM');curl_setopt($curl, CURLOPT_SSLCERT, $sslCert['certPem']);curl_setopt($curl, CURLOPT_SSLKEYTYPE, 'PEM');curl_setopt($curl, CURLOPT_SSLKEY, $sslCert['keyPem']);}$result = curl_exec($curl);curl_close($curl);return $result;}订单查询/*** 订单查询* @param $out_trade_no* @return mixed* @throws BaseException*/public function orderquery(){$transaction_id = '4200000712202007274705432240';//微信订单号// 当前时间$time = time();// ⽣成随机字符串$nonce_str = md5($time . mt_rand(00000,99999));//API参数$params = ['appid' => config('pay.APPID'), //公众号ID'mch_id' => config('pay.MCHID'), //商户号'transaction_id' => $transaction_id, //商户订单号'nonce_str' => $nonce_str, // 随机字符串];//⽣成签名$params['sign'] = $this->makeSign($params);//请求API$url = 'https:///pay/orderquery';$result = $this->post($url, $this->toXml($params));$prepay = $this->fromXml($result);// 请求失败if ($prepay['return_code'] === 'FAIL') {throw new BaseException(['msg' => $prepay['return_msg'], 'code' => 0]);}if ($prepay['result_code'] === 'FAIL') {throw new BaseException(['msg' => $prepay['err_code_des'], 'code' => 0]);}return $prepay;}退款查询/*** 退款查询* @param $out_trade_no* @return mixed* @throws BaseException*/public function refundquery(){$transaction_id = '4200000712202007274705432240';//微信订单号// 当前时间$time = time();// ⽣成随机字符串$nonce_str = md5($time . mt_rand(00000,99999));//API参数$params = ['appid' => config('pay.APPID'), //公众号ID'mch_id' => config('pay.MCHID'), //商户号'transaction_id' => $transaction_id, //商户订单号'nonce_str' => $nonce_str, // 随机字符串];//⽣成签名$params['sign'] = $this->makeSign($params);//请求API$url = 'https:///pay/refundquery';$result = $this->post($url, $this->toXml($params));$prepay = $this->fromXml($result);dump($prepay);die;// 请求失败if ($prepay['return_code'] === 'FAIL') {throw new BaseException(['msg' => $prepay['return_msg'], 'code' => 0]);}if ($prepay['result_code'] === 'FAIL') {throw new BaseException(['msg' => $prepay['err_code_des'], 'code' => 0]);}return $prepay;}⽀付成功,进⾏回调public function index(){$data = file_get_contents('php://input');$data = $this->FromXml($data);tp_log('⽀付回调数据===>' . json_encode($data), 'index', request()->controller());// 保存微信服务器返回的签名sign$data_sign = $data['sign'];// sign不参与签名算法unset($data['sign']);$sign = $this->makeSign($data);//回调验证签名$str_success = '<xml><return_code><![CDATA[SUCCESS]]></return_code><return_msg><![CDATA[OK]]></return_msg></xml>'; $str_error = '<xml><return_code><![CDATA[FAIL]]></return_code><return_msg><![CDATA[签名失败]]></return_msg></xml>';if (($sign === $data_sign) && ($data['return_code'] == 'SUCCESS') && ($data['result_code'] == 'SUCCESS')) {// ⽀付成功进⾏你的逻辑处理}echo $str_success;//str_error 告知微信你已的逻辑处理完毕不⽤再推送或再次推送你结果}退款成功进⾏回调/** ⼩程序退款结果通知*/public function refund(){$data = file_get_contents('php://input');$data = $this->FromXml($data);tp_log('退款回调数据===>' . json_encode($data), 'refund', request()->controller());//对加密的字符串解密$req_info_xml = openssl_decrypt(base64_decode($data['req_info']), 'aes-256-ecb', md5(config('pay.KEY')),OPENSSL_RAW_DATA); $req_info = $this->FromXml($req_info_xml);// // 保存微信服务器返回的签名sign// $data_sign = $data['sign'];// // sign不参与签名算法// unset($data['sign']);// $sign = $this->makeSign($data);//回调验证签名//// $str_success = '<xml><return_code><![CDATA[SUCCESS]]></return_code><return_msg><![CDATA[OK]]></return_msg></xml>'; // $str_error = '<xml><return_code><![CDATA[FAIL]]></return_code><return_msg><![CDATA[签名失败]]></return_msg></xml>';//////// if (($sign === $data_sign) && ($data['return_code'] == 'SUCCESS') && ($data['result_code'] == 'SUCCESS')) {// tp_log('退款成功===>', 'refund', request()->controller());// //去修改订单的状态和⽀付回调的⼀样修改成功告知微信不在推送// }}⽤到的⽅法/*** ⽣成签名* @param $values* @return string 本函数不覆盖sign成员变量,如要设置签名需要调⽤SetSign⽅法赋值*/private function makeSign($values){//签名步骤⼀:按字典序排序参数ksort($values);$string = $this->toUrlParams($values);//签名步骤⼆:在string后加⼊KEY$string = $string . '&key=' . config('pay.KEY');//签名步骤三:MD5加密$string = md5($string);//签名步骤四:所有字符转为⼤写$result = strtoupper($string);return $result;}private function ToUrlParams($array){$buff = "";foreach ($array as $k => $v) {if ($k != "sign" && $v != "" && !is_array($v)) {$buff .= $k . "=" . $v . "&";}}$buff = trim($buff, "&");return $buff;}/*** 输出xml字符* @param $values* @return bool|string*/private function toXml($values){if (!is_array($values)|| count($values) <= 0) {return false;}$xml = "<xml>";foreach ($values as $key => $val) {if (is_numeric($val)) {$xml .= "<" . $key . ">" . $val . "</" . $key . ">";} else {$xml .= "<" . $key . "><![CDATA[" . $val . "]]></" . $key . ">";}}$xml .= "</xml>";return $xml;}/*** 将xml转为array* @param $xml* @return mixed*/private function fromXml($xml){// 禁⽌引⽤外部xml实体libxml_disable_entity_loader(true);return json_decode(json_encode(simplexml_load_string($xml, 'SimpleXMLElement', LIBXML_NOCDATA)), true); }/*** 获取cert证书⽂件* @return array* @throws BaseException*/private function getCertPem(){// if (empty($this->config['cert_pem']) || empty($this->config['key_pem'])) {// throw new BaseException(['msg' => '请先到后台⼩程序设置填写微信⽀付证书⽂件']);// }// cert⽬录$filePath = EXTEND_PATH.'wxpay/cert/';return ['certPem' => $filePath . 'apiclient_cert.pem','keyPem' => $filePath . 'apiclient_key.pem'];}/*** ⽣成商户订单号*/public function get_orderssh(){return date("YmdHis") . mt_rand(10000000, 99999999);}证书路径config配置总结到此这篇关于基于thinkphp5框架实现微信⼩程序⽀付退款订单查询退款查询的⽂章就介绍到这了,更多相关微信⼩程序⽀付退款订单查询退款查询内容请搜索以前的⽂章或继续浏览下⾯的相关⽂章希望⼤家以后多多⽀持!。
stripe afterpay支付失败返回的参数
当Stripe与Afterpay集成的支付请求失败时,Stripe会返回以
下参数:
1. id: 付款对象的唯一标识符。
2. object: 类型为payment_intent。
3. amount: 请求支付的金额,以最小货币单位表示。
4. attempted: 指示是否尝试了付款。
5. status: 支付的当前状态。
可能的值包括:
requires_payment_method(需要付款方式)、
requires_confirmation(需要确认)、requires_action(需要采
取进一步操作,如验证)、processing(处理中)、succeeded (成功)、canceled(已取消)等。
6. error: 描述发生错误的原因。
包括类型和消息字段。
- type: 错误类型,例如"card_error"(卡错误)或"api_error"(API错误)。
- message: 错误消息,提供有关错误的详细信息。
这些参数将通过回调或异步Webhook通知提供给你的服务器。
请注意,每个支付对象的具体参数可能会有所不同,具体取决于Afterpay和Stripe的集成配置。
您可以通过查阅Stripe和Afterpay的文档以了解更多详细信息。
商户后台使用手册—境内业务修订记录目录1境内收单 (4)1.1订单及退款 (4)1.2子订单查询 (6)1.3退款查询 (7)1.4批量通知 (8)1.5批量退款 (9)1.6异常退款处理 (11)1.6.1取消退款 (12)1.6.2发起线下退款 (13)1.7线下退款查询 (15)1.8补贴订单查询 (17)1.9补贴退款查询 (18)2提现 (19)2.1发起提现 (19)2.2提现记录 (20)2.3退票查询 (21)3结算 (22)3.1发起结算 (22)3.2结算查询 (23)3.3结算信息 (24)4代付 (25)4.1发起代付 (25)4.2代付审核 (27)4.3批次查询 (28)4.4代付查询 (30)4.5退款查询 (31)4.6退票查询 (32)4.7批量通知 (33)5充值 (34)5.1普通充值 (34)5.2备用账户充值 (35)1境内收单境内收单,即境内的收单业务。
1.1订单及退款在【境内收单】-【订单及退款】可以查询境内收单交易订单以及订单的退款情况。
(1)查询条件⚫订单状态:境内收单交易的订单状态,分为未付、已付、取消。
⚫订单类型:境内收单交易订单的类型,分为标准版、申报版、海淘版。
⚫商户订单号:发起境内收单交易时使用的订单号。
⚫订单流水号:境内收单交易在首信易系统内的订单号。
⚫银行订单号:境内收单交易在银行系统内的订单号。
⚫支付方式:境内收单交易使用的支付方式,可以选择已开通的支付方式。
⚫完成时间:境内收单交易完成的时间。
⚫下单时间:境内收单交易创建的时间。
(2)统计统计查询出的所有的境内收单订单的总金额、总手续费。
(3)下载下载查询出的所有的订单。
(4)操作⚫详情:点击“详情”,显示该笔订单详情。
⚫退款:对于已付状态的订单,可以发起退款。
点击“退款”进入退款发起页面,输入退款金额、退款原因,点击“提交”,即可发起退款。
一笔订单可以发起多次退款。
⚫补发通知:对于已经完成的订单,若系统未收到首信易系统的异步通知,可以点击“补发通知”,首信易系统会再次发送异步通知。
中国工商银行银企互联系统接口说明V e r s i o n42中国工商银行银企互联系统接口说明Version 4.2中国工商银行电子银行部中国工商银行北京软件研发部2005年07月目录1帐户查询 (1)1.1单帐户余额查询 (1)提交包 (1)返回包 (1)1.2多帐户余额查询 (2)提交包 (2)返回包 (3)1.3当日明细查询 (4)提交包 (4)返回包 (5)1.4历史明细查询 (6)提交包 (6)返回包 (7)1.5现金管理户当日明细查询 (8)提交包 (9)返回包 (9)1.6现金管理户历史明细查询 (11)提交包 (11)返回包 (11)2转帐支付(逐笔) (13)支付提交包 (13)支付返回包 (15)逐笔支付查询提交包 (15)逐笔支付查询返回包 (16)3企业财务室 (17)3.1财务室批量指令 (17)提交包 (17)返回包 (19)3.2财务室批量指令查询 (19)提交包 (19)返回包 (20)4收费站 (22)4.1批量扣个人指令 (22)提交包 (22)返回包 (23)4.2批量扣个人指令查询 (24)提交包 (24)返回包 (24)4.3缴费个人信息查询 (25)提交包 (26)4.4批量扣企业指令 (27)提交包 (27)返回包 (29)4.5批量扣企业指令查询 (29)提交包 (29)返回包 (30)4.6缴费企业信息查询(只查已签订协议的) (31)提交包 (31)返回包 (32)5批量代理汇兑 (33)5.1代理汇兑指令提交 (33)提交包 (33)返回包 (35)5.2代理汇兑指令查询 (35)提交包 (35)返回包 (36)5.3网点信息下载 (37)提交包 (38)返回包 (38)6批量外汇汇款 (39)6.1集团内外汇资金调拨指令提交 (39)提交包 (39)返回包 (40)6.2集团内外汇资金调拨指令查询 (41)提交包 (41)返回包 (41)6.3B股资金清算指令提交 (43)提交包 (43)返回包 (44)6.4B股资金清算指令查询 (45)提交包 (45)返回包 (45)6.5国内外汇汇款指令提交 (47)提交包 (47)返回包 (48)6.6国内外汇汇款指令查询 (49)提交包 (49)返回包 (49)7电子商务 (51)7.1B2C订购指令查询 (51)提交包 (51)返回包 (52)7.2B2C退货、返还、转付指令查询 (53)返回包 (54)7.3B2B订购指令查询 (56)提交包 (56)返回包 (57)7.4B2B退货、返还指令查询 (59)提交包 (59)返回包 (60)7.5C2C订购指令查询 (61)提交包 (61)返回包 (62)7.6B2B/B2C退货、返还、转付指令提交 (64)提交包 (64)返回包 (65)7.7个人联名卡签权指令 (66)提交包 (66)返回包 (67)8工资单 (67)8.1工资单文件上传 (67)提交包 (67)返回包 (69)8.2工资单文件查询 (70)提交包 (70)返回包 (70)8.3工资单文件删除 (71)提交包 (72)返回包 (72)9附录错误代码 (73)9.1明文返回的错误代码 (73)9.2xml中retCode的错误代码 (73)1帐户查询1.1 单帐户余额查询提交包<?xml version="1.0" encoding = "GB2312"?><ICBCYH><opReq><opName>NCQueryBalanceOp</opName><ReqParam><Area_code>地区代码</Area_code><Account_num>帐号</Account_num> ---必输项<Account_cur>币种</Account_cur><userID>企业代码(和证书里的一致)</userID> ---必输项<PackageID>包序列ID</PackageID> ---必输项<ReqReserved1>请求包备用字段1</ReqReserved1><ReqReserved2>请求包备用字段2</ReqReserved2></ReqParam></opReq></ICBCYH>返回包<?xml version="1.0" encoding = "GB2312"?><ICBCYH><opRep><opName>NCQueryBalanceOp</opName><opResult><Account_num>帐号</Account_num><Account_cur>币种</Account_cur>例:RMB<retCode>错误返回码错误描述在errMsg 中</retCode><errMsg>错误描述</errMsg><Acc_balance>昨日余额</Acc_balance><Balance>余额</Balance><Usable_balance>可用余额</Usable_balance><Acct_property>帐户属性</Acct_property> 中文<PackageID>包序列ID</PackageID><userID>企业代码</userID><RepReserved1>返回包备用字段1</RepReserved1><RepReserved2>返回包备用字段2</RepReserved2></opResult></opRep></ICBCYH>1.2 多帐户余额查询提交包<?xml version="1.0" encoding = "GB2312"?><ICBCYH><opReq><opName>NCQueryBalanceListOp</opName><ReqParam><userID>企业代码(和证书里的一致)</userID> ---必输项<PackageID>包序列ID</PackageID> ---必输项<ReqReserved1>请求包备用字段1</ReqReserved1><ReqReserved2>请求包备用字段2</ReqReserved2></ReqParam><ReqParamSet><ReqParam><Area_code>地区代码</Area_code><Account_num>帐号</Account_num> ---必输项<Account_cur>币种</Account_cur><ReqReserved3>请求包备用字段3</ReqReserved3><ReqReserved4>请求包备用字段4</ReqReserved4></ReqParam></ReqParamSet></opReq></ICBCYH>返回包<?xml version="1.0" encoding = "GB2312"?><ICBCYH><opRep><opName>NCQueryBalanceListOp</opName><opResult><retCode>错误返回码错误描述在errMsg 中</retCode><errMsg>错误描述</errMsg><PackageID>包序列ID</PackageID><userID>企业代码</userID><RepReserved1>返回包备用字段1</RepReserved1><RepReserved2>返回包备用字段2</RepReserved2></opResult><opResultSet><opResult><Account_num>帐号</Account_num><Account_cur>币种</Account_cur><Acc_balance>昨日余额</Acc_balance><Balance>余额</Balance><Usable_balance>可用余额</Usable_balance><Acct_property>帐户属性</Acct_property>中文<RepReserved3>返回包备用字段3</RepReserved3><RepReserved4>返回包备用字段4</RepReserved4></opResult></opResultSet><ErrSet><Err><Account_num>账号</Account_num><errMessage>出错信息</errMessage></Err></ErrSet></opRep></ICBCYH>1.3 当日明细查询提交包<?xml version="1.0" encoding = "GB2312"?><ICBCYH><opReq><opName>NCCurDetailOp</opName><ReqParam><Area_code>地区代码</Area_code><Account_num>帐号</Account_num> ---必输项<Account_cur>币种</Account_cur><userID>企业代码(和证书里的一致)</userID> ---必输项<PackageID>包序列ID</PackageID> ---必输项<ReqReserved1>请求包备用字段1</ReqReserved1><ReqReserved2>请求包备用字段2</ReqReserved2></ReqParam></opReq></ICBCYH>返回包<?xml version="1.0" encoding = "GB2312"?><ICBCYH><opRep><opName>NCCurDetailOp</opName><opResult><retCode>错误返回码错误描述在errMsg 中</retCode><errMsg>错误描述</errMsg><Account_num>本方帐号</Account_num><PackageID>包序列ID</PackageID><userID>企业代码</userID><RepReserved1>返回包备用字段1</RepReserved1><RepReserved2>返回包备用字段2</RepReserved2></opResult><opResultSet><opResult><Trans_date>交易日期</Trans_date>(例:yyyy-MM-dd-HH:mm:ss:6位毫秒)共26位<Check_num>凭证号</Check_num><Bank1_code>对方行行号</Bank1_code><Rec_Account_num>对方账号</Rec_Account_num><Amount>发生额</Amount><Yt>用途</Yt><Trans_type>业务种类</Trans_type> 中文<PostScript>附言</PostScript><Rec_Account_name>对方户名</Rec_Account_name><sign>借贷标志</sign> 中文<Trans_abstr>摘要</Trans_abstr><RepReserved3>返回包备用字段3</RepReserved3><RepReserved4>返回包备用字段4</RepReserved4></opResult></opResultSet></opRep></ICBCYH>1.4 历史明细查询提交包<?xml version="1.0" encoding = "GB2312"?><ICBCYH><opReq><opName>NCHisDetailOp</opName><ReqParam><Area_code>地区代码</Area_code><Account_num>帐号</Account_num><Begin_date>起始日期</Begin_date> ---必输项(例:yyyyMMdd)<End_date>终止日期</End_date> ---必输项<Max_amount>最大金额</Max_amount> ---必输项(以分为单位,不带小数点)<Min_amount>最小金额</Min_amount> ---必输项<userID>企业代码(和证书里的一致)</userID> ---必输项<PackageID>包序列ID</PackageID> ---必输项<ReqReserved1>请求包备用字段1</ReqReserved1><ReqReserved2>请求包备用字段2</ReqReserved2></ReqParam></opReq></ICBCYH>返回包<?xml version="1.0" encoding = "GB2312"?><ICBCYH><opRep><opName>NCHisDetailOp</opName><opResult><retCode>错误返回码错误描述在errMsg 中</retCode><errMsg>错误描述</errMsg><PackageID>包序列ID</PackageID><userID>企业代码</userID><RepReserved1>返回包备用字段1</RepReserved1><RepReserved2>返回包备用字段2</RepReserved2></opResult><opResultSet><opResult><Area_code>地区代码</Area_code><Account_num>帐号</Account_num><Trans_date>交易日期</Trans_date> (例:yyyyMMdd)<Check_num>凭证号</Check_num><Trans_abstr>摘要</Trans_abstr><Debit_Amount>借方发生额</Debit_Amount><Crebit_Amount>贷方发生额</Crebit_Amount><Balance>余额</Balance><Rec_Account_num>对方账号</Rec_Account_num><Bank_name>开户行名称</Bank_name><Bank1_name>对方行行名</Bank1_name><Unit1_name>对方单位名称</Unit1_name><Trans_type>业务种类</Trans_type> 中文<Yt>用途</Yt><Trans_time>交易时间</Trans_time>(例:yyyy-MM-dd-HH:mm:ss:6位毫秒)共26位其值与当日明细中“交易日期”字段值一致<sign>借贷标志</sign> 中文<RepReserved3>返回包备用字段3</RepReserved3><RepReserved4>返回包备用字段4</RepReserved4></opResult></opResultSet></opRep></ICBCYH>1.5 现金管理户当日明细查询提交包<?xml version="1.0" encoding = "GB2312"?><ICBCYH><opReq><opName>NCCashManageAccCurDetailOp</opName><ReqParam><Area_code>地区代码</Area_code><Account_num>帐号</Account_num> ---必输项<Account_cur>币种</Account_cur><userID>企业代码(和证书里的一致)</userID> ---必输项<PackageID>包序列ID</PackageID> ---必输项<ReqReserved1>请求包备用字段1</ReqReserved1><ReqReserved2>请求包备用字段2</ReqReserved2></ReqParam></opReq></ICBCYH>返回包<?xml version="1.0" encoding = "GB2312"?><ICBCYH><opRep><opName>NCCashManageAccCurDetailOp</opName><opResult><retCode>错误返回码错误描述在errMsg 中</retCode><errMsg>错误描述</errMsg><Account_num>本方帐号</Account_num><PackageID>包序列ID</PackageID><userID>企业代码</userID><RepReserved1>返回包备用字段1</RepReserved1><RepReserved2>返回包备用字段2</RepReserved2></opResult><opResultSet><opResult><Trans_time>交易时间</Trans_time> HH:mm:ss<Bank1_code>对方行行号</Bank1_code><Rec_Account_num>对方账号</Rec_Account_num><Amount>发生额</Amount><Yt>用途</Yt><Trans_type>业务种类</Trans_type> 中文<PostScript>附言</PostScript><Rec_Account_name>对方户名</Rec_Account_name><sign>借贷标志</sign> 中文<Trans_abstr>摘要</Trans_abstr><REF>业务编号</REF><OREF>相关业务编号</OREF><BUSCODE>业务代码</BUSCODE><ENSUMMRY>英文备注</ENSUMMRY><CVOUHTYPE>凭证种类</CVOUHTYPE><CVOUHNO>凭证号</CVOUHNO><ADDINFO>附加信息</ADDINFO><RepReserved3>返回包备用字段3</RepReserved3><RepReserved4>返回包备用字段4</RepReserved4></opResult></opResultSet></opRep></ICBCYH>1.6 现金管理户历史明细查询提交包<?xml version="1.0" encoding = "GB2312"?><ICBCYH><opReq><opName>NCCashManageAccHisDetailOp</opName><ReqParam><Area_code>地区代码</Area_code><Account_num>帐号</Account_num><Begin_date>起始日期</Begin_date> ---必输项(例:yyyyMMdd)<End_date>终止日期</End_date> ---必输项<Max_amount>最大金额</Max_amount> ---必输项(以分为单位,不带小数点)<Min_amount>最小金额</Min_amount> ---必输项<userID>企业代码(和证书里的一致)</userID> ---必输项<PackageID>包序列ID</PackageID> ---必输项<ReqReserved1>请求包备用字段1</ReqReserved1><ReqReserved2>请求包备用字段2</ReqReserved2></ReqParam></opReq></ICBCYH>返回包<?xml version="1.0" encoding = "GB2312"?><ICBCYH><opRep><opName>NCCashManageAccHisDetailOp</opName><opResult><retCode>错误返回码错误描述在errMsg 中</retCode><errMsg>错误描述</errMsg><PackageID>包序列ID</PackageID><userID>企业代码</userID><RepReserved1>返回包备用字段1</RepReserved1><RepReserved2>返回包备用字段2</RepReserved2></opResult><opResultSet><opResult><TRXTYPE>交易类型</TRXTYPE> 中文<BUSIDATE>交易日期</BUSIDATE> yyyyMMdd<BUSITIME>交易时间</BUSITIME> HH:mm:ss<Account_num>交易帐号</Account_num><Bank_name>本方行名</Bank_name><Trans_type>业务种类</Trans_type> 中文<sign>借贷标志</sign> 中文<Debit_Amount>借方发生额</Debit_Amount><Crebit_Amount>贷方发生额</Crebit_Amount><Balance>余额</Balance><Yt>用途</Yt><CVOUHTYPE>凭证种类</CVOUHTYPE><CVOUHNO>凭证号</CVOUHNO><RECIPACT>对方帐号</RECIPACT><RECIPNAME>对方户名</RECIPNAME><RECIPBNA>对方行名</RECIPBNA><REF>业务编号</REF><OREF>相关业务编号</OREF><BUSCODE>业务代码</BUSCODE><ENSUMMRY>英文备注</ENSUMMRY><ADDINFO>附加信息</ADDINFO><RepReserved3>返回包备用字段3</RepReserved3><RepReserved4>返回包备用字段4</RepReserved4></opResult></opResultSet></opRep></ICBCYH>2转帐支付(逐笔)支付提交包<?xml version="1.0" encoding = "GB2312"?><ICBCYH><opReq><opName>NCpaySubmitOp</opName><ReqParam><Pay_Dep_name>汇款单位</Pay_Dep_name><Pay_Dep_Acc>汇款帐号</Pay_Dep_Acc> (35位)---必输项<Area_code>地区代码</Area_code><Pay_Dep_branch>汇款单位开户行</Pay_Dep_branch><Rec_Dep_name>收款单位</Rec_Dep_name> (60位) ---必输项<Rec_Dep_Acc>收款帐号</Rec_Dep_Acc> (35位) ---必输项<Rec_Area_Code>收款人地区代码</Rec_Area_Code> 0:它行 1:工行<Rec_Dep_branch>收款单位开户行</Rec_Dep_branch>(60位)--必输项<Trans_time>交易时间</Trans_time><Serial_no>指令序号</Serial_no><PayAmt>金额</PayAmt> (18位) ---必输项以分为单位<Account_cur>币种</Account_cur><Pay_Use>用途</Pay_Use> (20位)<Pay_type>汇款速度</Pay_type> 0:普通 1:加急<Author_log_id_1>授权人ID</Author_log_id_1><Author_log_id_2>二次授权人ID</Author_log_id_2><Submit_Log_id>提交人ID</Submit_Log_id> ---必输项 <Area_name>付款人账户地区名(付款人所在地) </Area_name><Rec_Area_name>收款人账户地区名(收款人所在地) </Rec_Area_name>---必输项收方如果是工行,以《信息对照表》中的地区代码对照表为准<Branch_code>账户分理处号</Branch_code><Pay_Password>支付密码</Pay_Password><User_Rem>备注栏(用户备注) </User_Rem><Pay_NetCode>付款行网点号</Pay_NetCode><Pay_BranchNo>付款行行号</Pay_BranchNo><Pay_BranchId>付款行行标识</Pay_BranchId><Pay_DispsNo>付款行分签号</Pay_DispsNo><Rec_BranchNo>对方行号</Rec_BranchNo><Rec_BranchId>对方行标识</Rec_BranchId><Rec_DispsNo>对方分签号</Rec_DispsNo><PostScript>附言</PostScript><PostScriptFlag>附言标志</PostScriptFlag><Transfer_Type>转帐类型</Transfer_Type><userID>企业代码(和证书里的一致)</userID> ---必输项<PackageID>包序列ID(15位)</PackageID> ---必输项<SignTime>签名时间(yyyyMMddhhmmssSSS)</SignTime> ---必输项<ReqReserved1>请求包备用字段1</ReqReserved1><ReqReserved2>请求包备用字段2</ReqReserved2></ReqParam></opReq></ICBCYH>支付返回包<?xml version="1.0" encoding = "GB2312"?><ICBCYH><opRep><opName>NCpaySubmitOp</opName><opResult><retCode>返回码</retCode>0-成功1-可疑其他为失败,错误描述在errMsg 中<errMsg>错误描述</errMsg><TranFlag>成功描述</TranFlag><PackageID>包序列ID</PackageID><userID>企业代码</userID><RepReserved1>返回包备用字段1</RepReserved1><RepReserved2>返回包备用字段2</RepReserved2></opResult></opRep></ICBCYH>逐笔支付查询提交包<?xml version="1.0" encoding = "GB2312"?><ICBCYH><opReq><opName>NCQueryPayOrderDetailOp</opName><ReqParam><userID>企业代码(和证书里的一致)</userID> ---必输项<PackageID>包序列ID</PackageID> ---必输项(提交指令中的包ID)<ReqReserved1>请求包备用字段1</ReqReserved1><ReqReserved2>请求包备用字段2</ReqReserved2></ReqParam></opReq></ICBCYH>逐笔支付查询返回包<?xml version="1.0" encoding = "GB2312"?><ICBCYH><opRep><opName>NCQueryPayOrderDetailOp</opName><opResult><retCode>错误返回码错误描述在errMsg 中</retCode>此值只表示该交易是否执行成功,并不代表此笔支付是否成功或失败(非空表示交易执行失败,失败原因见errMsg)。
深圳市跨境贸易电子商务通关服务平台(进口统一版)企业对接深圳市跨境贸易电子商务通关服务平台(进口统一版)企业对接数据标准1 / 39深圳市跨境贸易电子商务通关服务平台(进口统一版)企业对接(1)数据流转:企业→平台→海关、检验检疫、市场监管(2)报文命名:CEB_CEB311_[senderId]_EPORT_[yyyyMMddHHmmssSSS+4位流水号].xml。
3 / 39深圳市跨境贸易电子商务通关服务平台(进口统一版)企业对接深圳市跨境贸易电子商务通关服务平台(进口统一版)企业对接深圳市跨境贸易电子商务通关服务平台(进口统一版)企业对接3.支付凭证(1)数据流转:企业→平台→海关、检验检疫(2)报文命名:CEB_CEB411_[senderId]_EPORT_[yyyyMMddHHmmssSSS+4位流水号].xml。
7 / 39深圳市跨境贸易电子商务通关服务平台(进口统一版)企业对接13 / 39深圳市跨境贸易电子商务通关服务平台(进口统一版)企业对接6.入库明细单(1)数据流转:企业→平台→海关、检验检疫14 / 39深圳市跨境贸易电子商务通关服务平台(进口统一版)企业对接7.撤消单(1)数据流转:企业→平台→海关(2)报文命名:CEB_CEB623_[senderId]_EPORT_[yyyyMMddHHmmssSSS+4位流水号].xml。
15 / 39深圳市跨境贸易电子商务通关服务平台(进口统一版)企业对接16 / 39深圳市跨境贸易电子商务通关服务平台(进口统一版)企业对接8.退货单(1)数据流转:企业→平台→海关深圳市跨境贸易电子商务通关服务平台(进口统一版)企业对接18 / 39深圳市跨境贸易电子商务通关服务平台(进口统一版)企业对接19 / 39深圳市跨境贸易电子商务通关服务平台(进口统一版)企业对接20 / 39深圳市跨境贸易电子商务通关服务平台(进口统一版)企业对接21 / 39深圳市跨境贸易电子商务通关服务平台(进口统一版)企业对接9.入仓单(1)数据流转:企业→平台→检验检疫(2)报文命名:CEB_CEB701_[senderId]_EPORT_[yyyyMMddHHmmssSSS+4位流水号].xml。
微信退款API的操作⽅法⾸先我们需要申请到商户的key密钥这个是在账号关联(AppID绑定)应⽤场景当交易发⽣之后⼀段时间内,由于买家或者卖家的原因需要退款时,卖家可以通过退款接⼝将⽀付款退还给买家,微信⽀付将在收到退款请求并且验证成功之后,按照退款规则将⽀付款按原路退到买家账号上。
注意:1、交易时间超过⼀年的订单⽆法提交退款2、微信⽀付退款⽀持单笔交易分多次退款,多次退款需要提交原⽀付订单的商户订单号和设置不同的退款单号。
申请退款总⾦额不能超过订单⾦额。
⼀笔退款失败后重新提交,请不要更换退款单号,请使⽤原商户退款单号3、请求频率限制:150qps,即每秒钟正常的申请退款请求次数不超过150次4、每个⽀付订单的部分退款次数不能超过50次5、如果同⼀个⽤户有多笔退款,建议分不同批次进⾏退款,避免并发退款导致退款失败6、申请退款接⼝的返回仅代表业务的受理情况,具体退款是否成功,需要通过退款查询接⼝获取结果。
7、⼀个⽉之前的订单申请退款频率限制为:5000/min接⼝地址我们退款的时候需要注意要准备证书使⽤,在⽀付的时候不是必要条件需要证书请求需要双向证书。
⼀、超级管理员扫码登录微信⽀付商户平台后,进⼊账户中⼼找到API安全;点击申请证书,跳出⽣成API证书界⾯。
点击“允许访问”,同意⽹页访问剪切板;三、下载证书⼯具,在证书⼯具中点击“申请证书”按钮;四、按照要求填写商户信息,点击下⼀步;五、复制请求串到剪切板,在之前的⽣成API证书界⾯粘贴,输⼊“短信验证码”和“登录密码”;点击下⼀步,进⼊复制证书串界⾯。
六、复制证书串到剪切板,在证书⼯具的粘贴证书串界⾯,点击粘贴按钮。
然后进⼊下⼀步,⽣成证书。
七、⽣成证书之后,找到下载到电脑的证书⽂件,改个好认的名字发给技术⼈员,记得保留⼀个备份。
技术⼈员获得证书之后将证书部署到服务器上。
也就完成了微信⽀付与微信公众号等平台的对接了。
下⾯是请求时需要的参字段名变量名必填类型⽰例值描述公众账号ID appid是String(32)wx8888888888888888微信分配的公众账号ID(企业号corpid即为此appid)商户号mch_id是String(32)1900000109微信⽀付分配的商户号随机字符串nonce_str是String(32)5K8264ILTKCH16CQ2502SI8ZNMTM67VS随机字符串,不长于32位。
java使⽤AES-256-ECB(PKCS7Padding)解密——微信⽀付退款通知接⼝。
1.场景 在做微信⽀付退款通知接⼝时,微信对通知的内容做了加密,并且指定⽤ AES256 解密,官⽅指定的解密⽅式如下:2.导包<!-- https:///artifact/org.bouncycastle/bcprov-jdk15on --><dependency><groupId>org.bouncycastle</groupId><artifactId>bcprov-jdk15on</artifactId><version>1.60</version></dependency><!-- https:///artifact/org.jasypt/jasypt --><dependency><groupId>org.jasypt</groupId><artifactId>jasypt</artifactId><version>1.9.3</version></dependency>3.解密 说明:⽅法中参数 reqInfo 就是退款结果通知接⼝中的 req_info 字段值private String descrypt(String reqInfo) throws NoSuchPaddingException, NoSuchAlgorithmException, NoSuchProviderException, InvalidKeyException, BadPaddingException, IllegalBlockSizeException { byte[] reqInfoB = Base64.decodeBase64(reqInfo);String key_ = DigestUtils.md5Hex(WXPayConfig.getInstance().getKey()).toLowerCase();if (Security.getProvider("BC") == null){Security.addProvider(new BouncyCastleProvider());}Cipher cipher = Cipher.getInstance("AES/ECB/PKCS7Padding", "BC");SecretKeySpec secretKeySpec = new SecretKeySpec(key_.getBytes(), "AES");cipher.init(Cipher.DECRYPT_MODE, secretKeySpec);return new String(cipher.doFinal(reqInfoB));}4.结果5.上述过程之后在win本地运⾏没问题了,但是放到 linux 之后报错如下: java.security.InvalidKeyException: Illegal key size or default parameters 最终还是按⽹友的⽅法解决:替换jre包:local_policy.jar,US_export_policy.jar 5.1.下载 需要注意的是:替换的jar包版本需要与jre版本⼀致,各个版本包连接 jdk8: jdk7: jdk6: jdk5: 5.2.替换路径 %JAVE_HOME%\jre\lib\security6.参考 解密⽅式: 报错解决(报错内容“No such provider: BC”): 替换包参考:。
快钱快钱【【人民币支付网关人民币支付网关】】商户退款接口规范上海快钱信息服务有限公司目录1. 文档说明 (3)1.1 文档目标 (3)1.2 阅读对象 (3)1.3 相关约定 (3)1.4 技术支持 (3)2. 接口开发 (4)2.1 功能说明及流程 (4)2.2 开发准备 (4)2.3 参数说明 (4)2.3.1 商户提交到快钱 (4)2.3.2 快钱返回到商户 (5)2.4 开发提示 (6)2.4.1 签名字符串 (6)2.4.2 通知退款结果 (6)2.4.3 快钱对退款订单的处理 (6)3. 参考资料 (6)3.1 常见问题 (6)3.1.1 如何获取商户编号 (6)3.1.2 如何获取或修改退款密钥 (7)3.1.3 如何查询退款交易记录 (7)3.2 错误提示信息 (7)4 附录 (8)4.1 版权说明 (8)4.2 快钱资源 (8)1. 文档说明1.1 文档目标本文档的目的是为快钱人民币网关商户退款接口定义规范,以帮助商户技术人员接入,并快速掌握相关功能,便于尽快投入使用。
1.2 阅读对象快钱商户及合作伙伴的网上应用开发人员、维护人员和管理人员。
他们应具备以下基本知识:了解MICROSOFT WINDOWS/NT、WINDOWS9X、WINDOWS 2000、HP-UX、AIX、SUN SOLARIS、LINUX、BSD等操作系统的其中一种;了解上述系统上的网站设置和网页制作方法;熟悉CGI、ASP、PHP、.NET、JAVA 以及HTML、XML等开发语言及技术;了解信息安全的基本概念。
1.3 相关约定相关约定商户:指已注册成为快钱用户、并使用快钱产品实现其收付费功能需求、为其用户提供各类产品或者服务的企业或个人。
在本接口说明中指退款方。
用户:指在商户网站等系统购物的企业或个人。
在本接口说明中指收款方退款:指商户将购买产品或服务的款项全部或部分退还给用户。
{XXX}:XXX前后分别加{和},表示名称为XXX的变量所对应的值。
外部接口名称:即时到账批量退款接口服务名: refund_fastpay_by_platform_pwd修订历史版本号修订章节修订原因修订日期1.0全部起草2009-08-271.1部分外部接口文档统一梳理2010-03-14版权信息本手册中所有的信息都是支付宝公司的财产并且受到严格的保密。
未经过支付宝公司书面同意,接收本手册的人不能复制,公开,泄露手册的部分或全部的内容。
1、术语2、功能描述接收外部合作伙伴批量即时到账退款请求,需要页面输入密码确认。
当请求被接受,注册定时任务异步处理该批退款请求,全部完成后以通知方式告知外部合作伙伴。
3、访问形式页面调用4、请求输入参数表5、请求URL样例https:///cooperate/gateway.do?service=refund_fastpay_by_platform_pwd&partner=654851222&_i nput_charset=utf-8&sign_type=DSA&sign=dergdjv1gh0894q2gcjq447tcyn4dr3i1&seller_email=abc%&seller_user_id=%E6 %97%A0&refund_date=%E6%97%A0&batch_no=%E6%97%A0&batch_num=%E6%97%A0&detail_data=20080 32602676583%5E100%5E%E9%80%80%E4%BA%A4%E6%98%93%232008032602676584%5E10%5E%E9%80%8 0%E4%BA%A4%E6%98%93¬ify_url=http%3A%2F%%2Fnotify%2Falipay%2Finterface.htm6、请求输出参数6.1 通知返回的参数列表6.2 跳转URL样例/api/apireceive/returnSuccess.php?notify_time=2009-08-12+11%3A08%3A32¬ify_type=batch_refund_notify¬ify_id=70fec0c2730b27528665af4517c27b95&sign_ty pe=DSA&sign=_p_w_l_h_j0b_gd_aejia7n_ko4_m%252Fu_w_jd3_nx_s_k_mxus9_hoxg_y_r_lunli_pmma29_t_q %3D%3D&batch_no=20060702001&success_num=2&result_details=2010031906272929%5E80%5ESUCCESS6.3 页面跳转返回的参数列表跳转URL样例/api/apireceive/returnDisplay.php?detailTradeNO=%E6%97%A06.4 错误代码7、注意事项1) 此接口只支持https请求,详见请求url样例。
微信被扫支付接口文档V2.5 1微信被扫支付接口文档(版本2.5.6)微信被扫支付接口文档V2.5 2目录微信被扫支付接口文档 (1)1. 被扫支付介绍 (3)1.1 交互细节 (3)1.3 免密额度 (4)1.4 接口调用方式 (4)1.5 签名方式 (5)2. API 说明 (6)2.1 提交被扫支付API (6)2.2 被扫订单查询API (9)2.3 退款申请接口 (12)2.4 退款查询接口 (13)2.5 撤销接口 (15)2.6 对账单接口 (16)2.7 授权码查询OPENID 接口 (18)3.企业红包使用说明 (19)3.1 创建批次企业红包 (19)3.2 提交支付使用企业红包 (19)3.3 查询使用企业红包金额 (19)3.4 企业红包对账单 (20)4.错误码列表 (20)微信被扫支付接口文档V2.5 31. 被扫支付介绍1.1交互细节根据微信被扫支付场景,设计商家支付逻辑。
(1)商户收银系统生成订单,进入微信支付流程;(2)用户打开微信刷卡界面,收银系统扫描到用户二维码或条码(见下左图);(3)组装支付交易需要的数据,并生成签名(签名方式见1.5节);(4)调用微信被扫API(详见2.1节),提交支付请求;(5)用户使用微信被扫支付未超过免密限额(详见1.3节),微信直接扣款成功,否则用户端微信会弹出输入密码提示(见下中图),支付成功后用户微信侧会弹出交易结果(见下右图);-> ->(6)步骤4提交请求后会同步返回支付结果。
如果需要密码验证,支付结果返回USERPAYING (用户支付中)的状态。
当支付结果为系统错误,需要商户收银系统调用订单查询API(详见2.2节)查询支付实际交易结果;当返回USERPAYING时等待用户输入密码,系统可设置间隔时间(建议10秒)重新查询支付结果,直到支付成功或超时(建议30秒);(4)在交易状况不明晰的情况下调用撤销接口(详见2.5节),如果交易失败则关闭订单,该单不能再支付成功;如果交易成功,则将扣款退回到用户账户。
Godaddy的backorder退款到支付宝全过程以及这三个域名,按照我的思路,三个域名之中,总得有一个可以抢注下来吧,但事与愿违,还是以失败告终,之后再继续使用godaddy的backorder进行抢注域名,但没有一次成功过,所以就产生了退款的念头。
但网上一般的说法是购买了backorder,就不能退款,但经过我的努力,还是成功将款退回我的支付宝里面去了。
以前很天真,以为godaddy抢注域名相当不错,现在看来,稍微好一点的域名将在、、这三大网站进行抢注,不然在 godaddy抢注也是白费工夫。
好了,费话不多话,以下是退款过程,本人英语不怎么样,有些词语写得不好,大家就请原谅一下下。
首先发信给billing@,要求退款,在邮件中说明一下你的退款原因,由于是使用支付宝支付的,要求退款到支付宝里,同时写明my Customer以及Receipt编号。
然后godday回信说要取消订单,我当时以为我把backorder的删除之后就可以了,但还不是一样,一般你叫godaddy退款,就必须先取消order,取消订单的过程是:Select 'Payments and Renewing Items' from the 'My Renewals & Upgrades' menu.Check the box next to the item(s) you would like to cancel and click on the 'Cancel Item' button.Select 'Cancel Now' in the menu that appears to the right.Click on 'Save Changes'.记住,一定要先删除订单,不然说什么都没有用。
我估计其他产品的退款过程也是一样。
这样我取消完order之后,再发信给biling,这样,godaddy就发邮件发过来说同意退款了,要5~7的天的时间。
Skrill Merchant PortalMass Payments GuideThis guide describes how to use the Mass Payment service.Version 2.2Paysafe Holdings UK Limited, 25 Canada Square, Canary Wharf, London, E14 5LQ, UKCopyright© 2021 Paysafe Holdings UK Limited. All rights reserved.Skrill ® is a registered trademark of Paysafe Holdings UK Limited and is licensed to Skrill USA, Inc., Skrill Limited and Paysafe Payment Solutions Limited (collectively, the “Paysafe Companies”). Skrill USA Inc. is a Delaware corporation, company number 4610913, with a business address of 2 S. Biscayne Blvd, suite 2630, Miami, Florida, 33131. It is a licensed money transmitter, registered with FinCEN and various states across the US. The Skrill Visa ® Prepaid Card is issued by Community Federal Savings Bank, member FDIC, pursuant to a license from Visa®. Skrill Limited is registered in England and Wales, company number 04260907, with its registered office at 25 Canada Square, London E14 5LQ. It is authorized and regulated by the Financial Conduct Authority under the Electronic Money Regulations 2011 (FRN: 900001) for the issuance of electronic money. Paysafe Payment Solutions Limited trading as Skrill, Skrill Money Transfer, Rapid Transfer and Skrill Quick Checkout is regulated by the Central Bank of Ireland. Paysafe Payment Solutions is registered in Ireland, company number 626665, with its registered office is Grand Canal House, Upper Grand Canal Street, Dublin, 4DO4 Y7R5, Ireland. The Skrill Prepaid Mastercard is issued by Paysafe Financial Services Ltd in selected countries and by Paysafe Payment Solutions Limited as an affiliate member of Paysafe Financial Services Limited in selected countries pursuant to a license from Mastercard International. Mastercard® is a registered trademark of Mastercard International.The material contained in this guide is copyrighted and owned by Paysafe Holdings UK Limited together with any other intellectual property in such material. Except for personal and non-commercial use, no part of this guide may be copied, republished, performed in public, broadcast, uploaded, transmitted, distributed, modified, or dealt with in any manner at all, without the prior written permission of Paysafe Holdings UK Limited and then, only in such a way that the source and intellectual property rights are acknowledged.To the maximum extent permitted by law, none of Paysafe Holdings UK Limited or the Paysafe Companies shall be liable to any person or organization, in any manner whatsoever from the use, construction or interpretation of, or the reliance upon, all or any of the information or materials contained in this guide.The information in these materials is subject to change without notice and neither Paysafe Holdings UK Limited nor the Paysafe Companies assume responsibility for any errors.Skrill Ltd.Registered office: Skrill Limited, 25 Canada Square, Canary Wharf, London, E14 5LQ, UK.Version Control TableSkrill Merchant Portal Mass Payments Guide1.ABOUT THIS GUIDE (5)1.1 Objectives and target audience (5)1.2 Related documentation (5)1.3 Conventions used in this guide (5)1.4 Prerequisites (5)2.Skrill Merchant portal (6)3.Mass Payments (7)3.1 Prerequisites (7)3.2 Mass Payments using a Payment File (8)3.3 Mass Payment – Transaction Statuses (11)3.4 Mass Payment Error Scenarios (12)3.5 Transfer with an API Request (Standalone Credits) (12)4.APPENDICES (13)4.1 ISO 4217 currencies (13)4.2 Languages supported by Skrill (13)4.3 ISO country codes (3-digit) (13)5.GLOSSARY (18)1.ABOUT THIS GUIDE1.1Objectives and target audienceThis document can be used as a reference in using the Mass Payments section of the Skrill Merchant Portal. This guide does not cover payments using the Skrill Automated Payments Interface (API). 1.2Related documentationAlong with this guide, you can use the following Skrill documents to understand about the Skrill Merchant Portal.1.3Conventions used in this guideThe following table lists the text conventions used in this guide.1.4PrerequisitesYou must complete the merchant setup process to access the various features of the Skrill Merchant Portal. To complete this process, reach out to your Account Manager or send an email to ***************************.2.SKRILL MERCHANT PORTALThe Skrill Merchant Portal provides you a single interface to manage your digital wallet accounts. Using the portal, you can manage digital wallets and the associated transactions. In this portal, you can also perform actions like transfer money instantly to an account, exchange money between wallets, send money to multiple recipients at once, import funds to wallets, view balances / reserves, and withdraw money to a bank account, and so on. Following is a list of transactions supported by the Merchant Portal.•Send money.•Make payments to multiple customers.•Upload money•Exchange money•Withdraw money to your bank account.•Switch between your accounts•Manage your bank accounts.•Manage your account balances.•Search, filter, and view transactions•Check bank transfers from other accounts.•Create and manage users.•Configure your wallet account and API security settings.•Contact Merchant Services Team and get help.3. MASS PAYMENTSThe Mass Payment service enables you to make payments from your Skrill account to multiple recipients. The Mass Payments service should be enabled on your account before using this feature. Once the feature is enabled, you can see the Mass Payment button from the Home page > Quick Links or from Transfers > Mass Payments . To use the Mass Payments service, a payment file must be created with the details of recipients.Figure 3-1: Quick LinksSkrill Merchant Portal supports the following pay-out options:1. Pay-outs using the Mass Payments option with a payments file. You can send as many varyingamounts as required to hundreds of payment recipients at a time in a choice of 40 currencies (no integration is required). This method supports a maximum of 3000 payments per batch.2. Using a HTTPS API Request (standalone credits) - Automate your mass payments with Skrill.This advanced option, via an API interface, supports unlimited payments in varying amounts and different currencies. (Integration required). See the Automated Payments Interface guide for more details. 3.1 PrerequisitesBefore using the mass payment feature in the Skrill Merchant Portal, you should ensure you have an application that can create worksheets in Microsoft Excel or CSV format.Read through the following payment file restrictions if you encounter any errors in the mass payment process.o If the number of records in the payment file exceeds 3000 or if the file’s size exceeds 5MB, then the file will not be processed, and an error is displayed.o If you attempt to upload a file with the same name as a previous file uploaded inthis account, it will be rejected as a duplicate.o A new line character must replace row data.o Each item in a row can be separated from the previous item using a tab, comma, or semi‐colon cha racter. No other delimiters are allowed.o If you choose a payment currency that is different from the currency used by your Skrill account, then an exchange conversion fee will apply. Each merchant can seethe FX fee applicable for their account in the Fee Schedule they had signed duringthe onboarding process. For example, if you have a GBP Skrill account and thepayment is sent in EUR, the currency conversion fee will be applicable in your case.3.2Mass Payments using a Payment FileYou can create a payment file containing details of all the recipients you want to pay.To prepare a Mass Payment file:e an application like Microsoft Excel and create a blank worksheet.2.Save the file as comma-separated values CSV file (.csv).3.Add the details of the payment’s recipients in the following format. The file must contain thefollowing columns:Table 3-1: Mass Payment FieldsFollowing is an example of the payment file. Note the commas separating records as the file is saved in comma separated format (CSV).Figure 3-2: Example of a CSV file3.2.1Uploading the payment fileAfter you have prepared the mass payment file, upload the file using Mass Payments option:1.Login to your Skrill account.2.Click the Mass Payment option from the Quick Links menu. You can optionally add a message tothe payments/transactions by selecting the Message option. This message will be displayed in the email the recipients receive.3.Select a Currency Account.4.Click Browse and select the CSV or text file or drag the same file into the Drag and Drop/browsethe file here field and drop it.Table 3-2: Mass payment ‐ choose file and enter details.5.Click Next. Once the payment file is uploaded, you can see the list of recipient details on thescreen. The screen provides a preview of both valid transactions and transactions with errors. It also includes the total amount to be sent from your account and the total fees (calculated in thecurrency of your Digital Wallet account). Each merchant can see the FX fee applicable for their account in the fee schedule they have signed during the onboarding process.Figure 3-3: Mass payments transfer details.6.From the From Account list, select the currency account.Figure 3-4: From Account drop-down list•Check if the payment details are correct. To make changes click Cancel and update the CSV file and upload again.•If there are any errors in the payment file, the Mass Payment module does not allow you to proceed further.•If there are insufficient funds in the wallet, then you can proceed further. Select a wallet with sufficient funds.7.Click Confirm & Process. Once the file is processed, the Receipt page appears.•The Receipt page shows a whole list of transactions and a status for each transaction;for information about the different status values (See Table 3-3: List of PaymentTransaction Status Values below for information about the different status values).•If you get any errors during the mass payments procedure, see Mass Payment Error Scenarios section for more information.3.3Mass Payment – Transaction Statuses3.4Mass Payment Error Scenarios3.5Transfer with an API Request (Standalone Credits)You can also make mass payments using the Skrill Automated Payments Interface (API). It enables you to automate the sending of payment details from your servers to Skrill using an HTTPS request. See the Automated Payments Interface guide for more information.4.APPENDICES4.1ISO 4217 currenciesTable 3‐2: ISO 4217 Currencies accepted by Skrill4.2Languages supported by SkrillSkrill supports the following languages (2-character ISO codes):4.3ISO country codes (3-digit)Skrill does not accept customers from the following countries: Afghanistan, Cuba, Eritrea, Iran, Iraq, Japan, Kyrgyzstan, Libya, North Korea, Sudan, South Sudan, and Syria.5.GLOSSARYThis section provides a description of some key terms used in this guide.。
财付通批量银行代付接口开发手册Version: 3.0Public date: 2011-5-22All copyright reserved by 目录第1章文档描述 (5)1.1文档说明 (5)1.2版本 (5)1.3预期读者和阅读建议 (5)第2章业务描述 (5)2.1接口作用 (5)2.2银行代付接口限制 (5)第3章前期准备 (6)3.1.1业务准备 (6)3.1.2技术准备 (6)第4章接口说明 (6)4.1结构说明 (6)4.1.1接入URL (6)4.1.2接口原理 (7)4.2批量银行代付接口 (7)4.2.1功能描述: (7)4.2.2需要开通功能: (7)4.2.3接入URL (7)4.2.4输入参数 (8)4.2.5返回参数 (9)4.2.6接口特别说明 (9)4.3批量银行代付查询接口 (10)4.3.1功能描述: (10)4.3.2需要开通功能: (10)4.3.3输入参数 (10)4.3.4返回参数 (10)4.3.5返回参数说明 (13)4.4退票查询接口 (14)4.4.2需要开通功能: (14)4.4.3请求参数 (14)4.4.4返回参数 (15)第5章附录和枚举 (17)5.1付款到账时间 (17)5.2银行编码 (17)5.3开户地区编码 (19)5.3.1北京 (19)5.3.2上海 (20)5.3.3天津 (20)5.3.4重庆 (20)5.3.5河北 (20)5.3.6山西 (21)5.3.7内蒙古 (21)5.3.8辽宁 (22)5.3.9吉林 (22)5.3.10黑龙江 (22)5.3.11江苏 (23)5.3.12浙江 (23)5.3.13安徽 (24)5.3.14福建 (24)5.3.15江西 (25)5.3.16山东 (25)5.3.17河南 (26)5.3.18湖北 (26)5.3.19湖南 (27)5.3.20广东 (27)5.3.21广西 (28)5.3.23四川 (29)5.3.24贵州 (30)5.3.25云南 (30)5.3.26西藏 (31)5.3.27陕西 (31)5.3.28甘肃 (32)5.3.29宁夏 (32)5.3.30青海 (32)5.3.31新疆 (33)5.4安全性说明 (33)5.5代付查询 (34)5.6代付明细查询 (35)5.7电子回单 (35)5.8对账单下载 (36)5.9财付通对应付款银行说明 (37)5.10财付通付款手机短信通知格式 (37)5.11错误码 (38)第1章文档描述1.1文档说明本操作手册用来指导财付通商户实现与财付通银行代付接口的顺利对接。
即时到账批量退款⽆密接⼝(refund_fastpay_by_platform_nopwd)即时到账批量退款⽆密接⼝服务名称:refund_fastpay_by_platform_nopwd版本号:3.9⽀付宝(中国)⽹络技术有限公司版权所有⽬录1 ⽂档说明 (5)1.1 功能描述 (5)1.2 阅读对象 (5)1.3 业务术语 (5)2 功能演⽰ (6)3 数据交互 (7)4 请求参数说明 (8)4.1 含义 (8)4.2 列表 (8)4.3 单笔数据集参数说明 (9)4.4 单笔数据集(detail_data)注意事项 (10)4.5 分润退款数据集格式注意事项 (10)4.6 ⼦交易退款数据集格式注意事项 (11)4.7 充退通知地址参数说明 (11)4.8 退款模式优缺点列表 (11)4.9 样例 (12)5 xml同步返回参数说明 (12)5.1 含义 (12)5.2 列表 (13)5.3 样例 (13)6 服务器异步通知参数说明 (14)6.1 含义 (14)6.2 列表 (14)6.3 处理结果详情说明 (15)6.4 样例 (17)7 充退异步通知参数说明 (18)7.1 含义 (18)7.2 列表 (18)7.3 样例 (19)8 通知返回数据处理 (20)8.1 xml同步返回特性 (20)8.2 服务器异步通知页⾯特性 (20)8.3 通知触发条件 (21)8.4 商户业务处理注意事项 (21)9 签名机制 (22)9.1 ⽣成待签名的字符串 (22)9.1.1 需要参与签名的参数 (22)9.1.2 ⽣成待签名字符串 (22)9.2 签名 (23)9.2.1 MD5签名 (23)9.2.2 DSA、RSA签名 (24)10 如何验证是否⽀付宝请求 (24)11 附录 (25)11.1 即时到账批量退款业务错误码 (25)11.2 系统错误码 (29)11.3 银⾏列表 (29)1 ⽂档说明1.1 功能描述对通过即时到账接⼝付款完成的交易进⾏部分或全部的退还。
第1篇第一部分:基础知识1. 微信支付和支付宝支付的基本概念- 请简述微信支付和支付宝支付的基本工作原理。
- 微信支付和支付宝支付在用户流程上有哪些区别?2. PHP在支付系统中的作用- PHP在支付系统中主要承担哪些角色?- 请说明PHP在处理支付请求时需要考虑哪些安全性问题。
3. API对接- 什么是API?在支付系统中,API对接有哪些步骤?- 请描述如何使用PHP调用支付宝或微信支付的API。
4. 支付流程- 请详细描述微信支付或支付宝支付的一个完整流程,包括用户发起支付、支付平台处理、支付结果通知等环节。
5. 支付参数- 在支付过程中,常见的支付参数有哪些?请举例说明。
- 如何确保支付参数的正确性和安全性?第二部分:技术实现6. 选择支付平台- 如何选择合适的支付平台?- 在选择支付平台时,需要考虑哪些因素?7. 注册开发者账号- 请描述如何注册支付宝或微信支付的开发者账号。
- 开发者账号注册后,需要获取哪些信息?8. API文档和密钥- 什么是API文档?为什么它对支付系统开发至关重要? - 请说明如何获取和使用API文档中的密钥。
9. 编写Pay函数- 请描述如何编写一个Pay函数来实现支付请求。
- 在Pay函数中,需要构造哪些支付参数?10. 支付状态查询- 请说明如何查询支付状态。
- 常见的支付状态有哪些?11. 退款处理- 请描述如何处理退款请求。
- 退款处理需要注意哪些问题?12. 回调处理- 什么是支付回调?- 请说明如何处理支付回调。
第三部分:安全性与优化13. 支付金额验证- 请描述如何验证支付金额的正确性和合法性。
- 在PHP中,可以使用哪些方法进行金额验证?14. 防止SQL注入- 什么是SQL注入攻击?- 在支付系统中,如何防止SQL注入攻击?15. 支付请求加密- 请说明支付请求加密的必要性。
- 在PHP中,如何实现支付请求的加密?16. 性能优化- 请描述如何优化支付系统的性能。
【laravel5】详解laravel的chunk和chunkById函数1、laravel的chunk和chunkById主要处理⽐较⼤的数据,通过分块来处理。
优缺点:1)chunk的话,底层原理是通过分页page参数处理,update的时候回存在漏⼀半数据情况(并且MySQL的分页在数据量⼤时,严重影响查询效率)2)因为2,出现了chunkById的优化版本,通过主键priKey(或者其他column,下⾯会讲)来处理数据,完美的避过update和分页效率低下问题3、参考⽂档:https:///13.htmlhttps:///a/1190000015284897https:///articles/15655/the-use-of-offset-limit-or-skip-and-take-in-laravel4、本⽂具体讲解chunkById使⽤和底层运⾏原理,chunk不讲。
先上⼲货代码:<?phpnamespace App\Console\Commands;use Illuminate\Console\Command;use App\Model\OrderReturnTrace;use App\Dao\UpPayOrderDao;use App\Model\OrderPayTrace;use App\Model\OrderTrace;class OmsOrderDeliveryQuery extends Command{/*** The name and signature of the console command.** @var string*/protected $signature = 'oms:odquery {order_id?}';protected $order_id;/*** The console command description.** @var string*/protected $description = '待发货单物流查询及更新';/*** Create a new command instance.** @return void*/public function __construct(){parent::__construct();}/*** Execute the console command.** @return mixed*/public function handle(){//$this->order_id = $this->argument('order_id') ?? '';try{if(!empty($this->order_id)) {$orderM = OrderTrace::where(['order_id'=>$this->order_id, 'pay_status'=>2, 'order_status'=>1, 'delivery_status'=>1])->first();if(empty($orderM)) return ;if(! $res = UpPayOrderDao::omsDeliveryQuery($orderM->order_id) ){return false;}# 更新物流信息UpPayOrderDao::orderDeliveryRelease($this->order_id, $res);return true;} else {# 执⾏oms物流查询$echoCsv = function($item){if(! $res = UpPayOrderDao::omsDeliveryQuery($item->order_id) ){log_write("定时任务退款单refundId{$item->refund_id}状态查询有误");return false;}# 更新物流信息UpPayOrderDao::orderDeliveryRelease($item->order_id, $res);};# 批量查询字段涉及update,使⽤chunkById($count, $callback, $coulumn, $alias)处理,避免chunk漏数据$refundAll = OrderTrace::where('pay_status', 2)->where('order_type', 0)->where('order_status', 1)->where('pay_channel', 2)->where('delivery_status', 1)->select('id','order_id','');$refundAll->chunkById(200, function($refundAll) {foreach ($refundAll as $item) {$echoCsv($item);}}, 'id');}}catch(\Exception $e) {log_write("定时任务refundOrderUnionPayQuery,异常:msg={$e->getMessage()}");UpPayOrderDao::sendEmail('定时任务refundOrderUnionPayQuery,异常', $e->getMessage());return false;}return ;}}5、chunkById的底层原理&运⾏:(或者其他column,下⾯会讲)参考这篇⽂章,讲得很清楚的:https:///13.htmlLaravel chunk和chunkById的坑公司中的项⽬在逐渐的向Laravel框架进⾏迁移。