模拟支付宝支付

一 问题描述:
支付宝支付显示系统繁忙,请稍后重试!
解决办法:
https://openclub.alipay.com/read.php?tid=6918&fid=60
在这里,我的问题是:
(1)sign_type=RSA
(2)支付公钥和私钥填错
二 模拟支付宝支付
1 请求地址
https://ch-zgmart.wshoto.com/addons/ewei_shop/payment/alipay/notify_app.php
用postman模拟支付宝发起支付请求,url:绝对路径
2 请求参数
这里写图片描述
请求参数参考notify_alipay_app.log

{
    "status": 1,
    "result": {
        "order": {
            "id": "387",
            "shopid": "0",
            "openid": "u76a1ed51e465fc5e560976cc52050f57",
            "ordersn": "SH201806151059135697",
            "price": "104.50",
            "dispatchtype": "0",
            "addressid": "49",
            "carrier": "a:0:{}",
            "status": "0",
            "isverify": "0",
            "payAgentCredit3": "0.00",
            "deductcredit2": "0.00",
            "addcredit2": "0.00",
            "goods": {
                "425": {
                    "id": "425",
                    "uniacid": "1",
                    "orderid": "387",
                    "goodsid": "227",
                    "price": "110.00",
                    "total": "1",
                    "optionid": "0",
                    "createtime": "0",
                    "optionname": "",
                    "commission1": null,
                    "applytime1": "0",
                    "checktime1": "0",
                    "paytime1": "0",
                    "invalidtime1": "0",
                    "deletetime1": "0",
                    "status1": "0",
                    "content1": null,
                    "commission2": null,
                    "applytime2": "0",
                    "checktime2": "0",
                    "paytime2": "0",
                    "invalidtime2": "0",
                    "deletetime2": "0",
                    "status2": "0",
                    "content2": null,
                    "commission3": null,
                    "applytime3": "0",
                    "checktime3": "0",
                    "paytime3": "0",
                    "invalidtime3": "0",
                    "deletetime3": "0",
                    "status3": "0",
                    "content3": null,
                    "realprice": "110.00",
                    "goodssn": "001",
                    "productsn": "001",
                    "pcate": "3",
                    "type": "1",
                    "ccate": "25" }
            }
        },
        "address": {
            "realname": "无心",
            "mobile": "测试",
            "address": "无心"
        },
        "carrier": false
    }
}

3 注
if ( ( $log['fee'] == $total_fee ))
在测试的时候将支付订单时的金额改为0.01,方便测试。但这里判断了生成订单的价格和支付的价格是否相同,只有两者相同才算是支付成功。

猜你喜欢

转载自blog.csdn.net/helenxd/article/details/80738759