支付宝能不能充q币里cny能不能用 要是用了怎么还

支付宝支付与微信支付服务端回调notify_url数据的区别
这两天优化了一下支付宝支付和微信支付订单回调的问题,之前我们的订单都是用手动回调给服务器,现在改成支付宝和微信原生的异步回调,结果并没有像我们想象的那么简单,支付宝是很顺利的解决回调,用一般的方式接收即可,但是微信接收时用普通的接收方式是不行的必须用另一种方式,如下且看:
&支付宝和微信的回调地址
notifyUrl = RequestUrl.BASE_URL+&order/order_payment&+&?order_code=&+orderC
& 服务器端是PHP开发,因此此处以PHP为例:
& 支付宝接收回调的方法
* sCreater
* function:订单支付完成后回写(支付宝支付回调)
* @return json
public function actionOrder_payment(){
$getData = $this-&_requestD
parent::write_log('order/order_payment',$getData);
if (empty($getData['order_code'])){
$data = array(
'error_code' =& 1,
'error_msg' =& '参数错误',
'data' =& ''
parent::json_encode($data);
if (!empty($getData['trade_status']) || $getData['trade_status'] =='TRADE_SUCCESS') {
LinshiOrderMaster::confirmPayment($getData['order_code'],$getData['price'],'2',$getData['trade_no']);
$data = array(
'error_code' =& 0,
'error_msg' =& '支付成功',
'data' =& ''
parent::json_encode($data);
& 支付宝服务器返回的数据
&_id&: ObjectId(&55ec4550c6fdc2f03d8b48c5&),
&name&: &order/order_payment&,
&server_url&: &http://api.xxx.**/v1.5.4/order/order_payment&,
&accept_data&: {
&order_code&: &64&,
&discount&: &0.00&,
&payment_type&: &1&,
&subject&: &陈*梅&,
&trade_no&: &9256&,
&buyer_email&: &*********@qq.com&,
&gmt_create&: & 18:29:13&,
&notify_type&: &trade_status_sync&,
&quantity&: &1&,
&out_trade_no&: &257&,
&seller_id&: &1245&,
&notify_time&: & 21:53:20&,
&body&: &课程支付&,
&trade_status&: &WAIT_BUYER_PAY&,
&is_total_fee_adjust&: &Y&,
&total_fee&: &0.01&,
&seller_email&: &xxxpay@xxx.biz&,
&price&: &0.01&,
&buyer_id&: &5312&,
&notify_id&: &4e270bbaa6f2eac2c39e3q&,
&use_coupon&: &N&,
&sign_type&: &RSA&,
&sign&: &******4GyXJaugFZqoiRQ4DE5VOn/EQjohiCulI5jRuogGiFb7ncZv/FjgZVD00QrnDGxYT8+XUAKThAQ01kCEHJJMLKHMxix9NXdeh8thXcDRBX/MJOnc4C/J8tk+U1D4VwkL1c [...]&
&header&: [
&time&: &21:53:20&
& 微信接收回调方法
* sCreater: miki
* function:订单支付完成后回写数据库(微信支付回调)
* @return json
public function actionOrder_wx_payment(){
= $GLOBALS[&HTTP_RAW_POST_DATA&];
$getData = simplexml_load_string($postStr, 'SimpleXMLElement', LIBXML_NOCDATA);
parent::write_log('order/order_wx_payment',$getData);
if (empty($getData['order_code'])){
$data = array(
'error_code' =& 1,
'error_msg' =& '参数错误',
'data' =& ''
parent::json_encode($data);
if (!empty($getData['result_code']) || $getData['result_code'] =='SUCCESS') {
LinshiOrderMaster::confirmPayment($getData['order_code'],$getData['total_fee']/100,'1',$getData['transaction_id']);
$data = array(
'error_code' =& 0,
'error_msg' =& '支付成功',
'data' =& ''
parent::json_encode($data);
& 微信接口返回的数据
&_id&: ObjectId(&55ed2bcdc6fdc2c83d8b4e79&),
&name&: &order/order_payment&,
&server_url&: &http://api.xxx.***/v1.5.4/order/order_payment&,
&accept_data&: {
&appid&: &wx8be381be5d594578&,
&bank_type&: &COMM_DEBIT&,
&cash_fee&: &1&,
&fee_type&: &CNY&,
&is_subscribe&: &N&,
&mch_id&: &&,
&nonce_str&: &9a3d46f63dfd8b0153ece4&,
&openid&: &*********YfgoQPliYWg&,
&order_code&: &58&,
&out_trade_no&: &5d79099fcdf499f12b4a&,
&result_code&: &SUCCESS&,
&return_code&: &SUCCESS&,
&sign&: &D2AD1EE0FAC2A94E0CE4&,
&time_end&: &37&,
&total_fee&: &1&,
&trade_type&: &APP&,
&transaction_id&: &9912&
&header&: [
&time&: &14:16:45&
& 1、回调地址之所以加了order_code=&+orderCode,主要是便于更新订单的状态,并且支付宝和微信都会自动将我们带的参数插入到原生数据一起返回给我们的服务端;
& 2、支付宝回调的方法只是普通的post接收即可;
& 3、微信回调的方法用的关键代码在 &$postStr &= $GLOBALS[&HTTP_RAW_POST_DATA&];
& (1)支付成功通知的内容可以使用 & $_GET 获取订单信息
& (2)接收微信后台发送过来的消息,该消息数据结构为XML,不是php默认的数据类型
& & $postStr = $GLOBALS[&HTTP_RAW_POST_DATA&];
& (3)使用simplexml_load_string() 函数将接收到的XML消息数据载入对象$postStr中。 &$getData = simplexml_load_string($postStr, 'SimpleXMLElement', LIBXML_NOCDATA);&
&总结:支付宝支付和微信支付回调的区别就在于他们回调的数据方式不一样,所以app服务端接收数据的方式也不一样,切记,写此博文方便大家不再走弯路,与君共享! 另外如果有方面的还请大家一起分享,一起进步。
(window.slotbydup=window.slotbydup || []).push({
id: '2467140',
container: s,
size: '1000,90',
display: 'inlay-fix'
(window.slotbydup=window.slotbydup || []).push({
id: '2467141',
container: s,
size: '1000,90',
display: 'inlay-fix'
(window.slotbydup=window.slotbydup || []).push({
id: '2467143',
container: s,
size: '1000,90',
display: 'inlay-fix'
(window.slotbydup=window.slotbydup || []).push({
id: '2467148',
container: s,
size: '1000,90',
display: 'inlay-fix'您的举报已经提交成功,我们将尽快处理,谢谢!
支付宝上面绑定的银行卡账号中间都是省略的,看不全的。
是支付宝与银行系统的问题。快捷支付要求银行卡和支付宝的注册信息(姓名、身份证号、手机号)都一致,才能设置快捷支付
大家还关注
(window.slotbydup=window.slotbydup || []).push({
id: '2081942',
container: s,
size: '1000,60',
display: 'inlay-fix'支付宝CNY是啥意思_百度知道
支付宝CNY是啥意思
我有更好的答案
人民币(Chinese Yuan)代码CNY,是ISO分配给中国的币种表示符号。 目前人民币(RenMinBi Yuan)简写为RMB¥,其简写用的是人民币汉语拼音开头字母组合,标准货币符号为CNY。
其他类似问题
为您推荐:
支付宝的相关知识
等待您来回答
下载知道APP
随时随地咨询
出门在外也不愁

我要回帖

更多关于 支付宝能不能充q币 的文章

 

随机推荐