Notify

Introduction

When a payment is done, scanforpay will notify the merchant the result. scanforpay may notify multiple times, so merchant should deal the repeat notifications. After receiving the notification, merchant must return success string immediately to tell scanforpay stop calling the notify url. If merchant doesn't response a success, after calling several times of the notify url, scanforpay will stop to notify neither.

Notify Url

POST notifyUrl field in the create order request

Notify Request Body
Name Parameter Type Required Description
Response code code int(5) Y 1:success,Others: fail
Response message msg varchar (100) Y Response message
Order Number orderNo varchar(32) C Generated by scanforpay
Merchant Order Number partnerOrderNo String (32) Y Generated by merchant
20180802100000001
Transaction amount orderAmount int Y The unit of the transaction amount is the smallest unit of the currency
If the currency is RMB, the unit is Fen. So if the transaction amount is 1 Yuan, 100 should be passed;if curreny is JPY, the unit is Japanese Yen
Wallet wallet String (10) Y Wechat: Wechat Pay
Alipay: Alipay
Transaction Status status int Y 0:To be Paid
1:Success
2:Fail
3:Refunded
Transation Time payTime String(25) N Date time with timezone, see RFC 3339 Section 5.6 for details.
2018-07-25T17:54:00+08:00
Currency currency varchar(5) Y JPY
Buyer account buyer varchar(30) N c*@gmail.com
Buyer ID buyerId varchar(30) N 208xxxxxxxxxx012
Notify Sample
{
    "response": {
        "header": {
            "partnerNo": "10001",
            "respTime": "2018-07-25T18:06:12+08:00",
            "signType": "SHA256",
            "version": "1.0",
            "reqMsgId": "213ca19e-c75f-450d-9acf-46e860570bb9"
        },
        "body": {
            "code": 1,
            "msg": "success",
            "orderNo": "2018072518060757",
            "partnerOrderNo": "p20180725180605466813",
            "payTime": "2018-07-25T18:06:12+08:00",
            "orderAmount": 2100,
            "wallet": "Alipay",
            "currency": "JPY",
            "status": 1,
            "buyer":"cd****@qq.com",
            "buyerId":"208xxxxxxxxxx012"
        }
    },
    "signature": "0710b2630b467c14b3d54295def7f89be61097c21472547823b43c58f3466b08"
}
Notify Resonse Body

success

results matching ""

    No results matching ""