RT,不知有没有大神愿意解答一下。
先贴代码为敬:
返回值:
那么,我的问题是:
{ "alipay_trade_query_response": { "code": "10000", "msg": "Success", "trade_no": "2013112011001004330000121536", "out_trade_no": "6823789339978248", "buyer_logon_id": "159****5620", "trade_status": "TRADE_CLOSED", "total_amount": 88.88, "trans_currency": "TWD", "settle_currency": "USD", "settle_amount": 2.96, "pay_currency": 1, "pay_amount": "8.88", "settle_trans_rate": "30.025", "trans_pay_rate": "0.264", "buyer_pay_amount": 8.88, "point_amount": 10, "invoice_amount": 12.11, "send_pay_date": "2014-11-27 15:45:57", "receipt_amount": "15.25", "store_id": "NJ_S_001", "terminal_id": "NJ_T_001", "fund_bill_list": [ { "fund_channel": "ALIPAYACCOUNT", "bank_code": "CEB", "amount": 10, "real_amount": 11.21 } ], "store_name": "证大五道口店", "buyer_user_id": "2088101117955611", "auth_trade_pay_mode": "CREDIT_PREAUTH_PAY", "buyer_user_type": "PRIVATE", "mdiscount_amount": "88.88", "discount_amount": "88.88" }, "sign": "ERITJKEIJKJHKKKKKKKHJEREEEEEEEEEEE" }
感觉少了好多字段!!???
最主要的我想得到store_name的值怎么破?
这是官方文档:https://docs.open.alipay.com/api_1/alipay.trade.query
大神请留步为小弟解答一下吧 T_T
给个豆子,哈哈搞定
白捡的=。=
MMP o_O? 我这json是走后台返回的。你这直接var怎么回事?主要是后台请求了支付宝接口返回的数据不全,我贴出来的JSON是官方的
@bingco: 那你是不是要后台查完这些数据转成json发给前台或者别的地方,如果是的的话那就先把这个值拿到不行么?在转json之前
@bingco: 你跟楼上都看错了。为什么返回数据不全,因为API文档已经写了不是必返,你调用支付API时候没用填入那些比如优惠和门店ID之类的字段,所以你查询时候就不会有返回了
@sjxinghan: 原来如此
@sjxinghan 正解