In-App支付


[!TIP|style:flat] 注意:请提供微信小程序Appid给YabandPay,需要开通以后才能使用。

API URL:https://mapi.yabandpay.com/Payments

Method:POST

POST data type:Json

参数 类型 描述 是否必填
user String 收银员账号的UID 必填
sign String 签名 必填
method String v3.CreatePaymentsWechatAPPPay 必填
time Long 时间戳 必填
  • 参数
参数 类型 描述 是否必填
pay_method String online 必填
sub_pay_method String WeChat Pay 必填
order_id String 商户的订单ID 必填
amount String 金额数字。例如 € 24.99 应该写成24.99,CNY金额>=1,欧元金额>=0.1 必填
currency String 货币代码,ISO 4217,例如EUR,CHF 必填
description String 订单描述 必填
demo String 自定义字段 选填
timeout String 过期时间0-1440 分钟,如不设置默认1440分钟 必填
notify_url String 支付完成后异步通知地址 必填
sub_app_id String APP的APPID 必填

签名示例:

拼接为URL方式并排序后的字符串

"amount=0.1&currency=EUR&description=YabandPay test&method=v3.CreatePaymentsWechatAPPPay&notify_url=https://www.yabandpay.com/notify&order_id=202459846951635165&pay_method=online&sub_app_id=wxc72defa5cec6dfc7&sub_pay_method=WeChat Pay&time=1546588959&timeout=0&user=016683"

得到的 stringA 使用 secret_key做签名

得到的签名如下:

"51811ce6c796e4a7e2ee7ebf5e6cce1de93ee3c5f485fd06022228d599553352"

提交示例:

{
    "user": "016683",
    "sign": "51811ce6c796e4a7e2ee7ebf5e6cce1de93ee3c5f485fd06022228d599553352",
    "method": "v3.CreatePaymentsWechatAPPPay",
    "time": 1546588959,
    "data": {
        "description": "YabandPay test",
        "timeout": "0",
        "pay_method": "online",
        "sub_pay_method": "WeChat Pay",
        "order_id": "202459846951635165",
        "amount": "0.1",
        "currency": "EUR",
        "notify_url": "https://www.yabandpay.com/notify",
        "sub_app_id": "wxc72defa5cec6dfc7"
    }
}

返回示例:

{
    "status": true,
    "code": "200",
    "data": {
        "order_id": "202459846951635165",
        "trade_id": "eaf6b81c-1a19-3ce5-d2d7-4002d6812c76",
        "amount": "0.10",
        "currency": "EUR",
        "parameters": {
            "appid": "wxc72defa5cec6dfc7",
            "partnerid": "299811131",
            "prepayid": "wx15164758052100530086b5391151892200",
            "package": "Sign=WXPay",
            "noncestr": "_YB_5d2c3dbe544a4",
            "timestamp": "1563180478",
            "sign": "B2DABBB957F96105AF007BA7EAB6D9879B0C3A402E884F64FE9CD3049106EF01"
        },
        "state": "processing"
    },
    "message": ""
}

请将这个参数返回给App的对应接口拉起微信支付。

更多信息:

返回结果:
  1. 若调用成功,则返回"status": true

  2. 若调用失败,则返回"status": fales

我们强烈建议同时使用订单查询异步通知来同步和更新支付状态,以确保支付信息的实时准确性。

返回代码:
Status Code Message
true 200 Success
fales -1000 Internal error
fales -3001 Required field is missing
fales -403 The signature Error
fales -4011 Not support the payment method

results matching ""

    No results matching ""