loading…

Detailed explanation of nextAction parameter usage

The online payment interface can pass the nextAction parameter to implement the next function that needs to be executed after the payment is successful: #Basic usage ## Pay for mall orders ```json {type:0, id:1234} ``` Where id is the order number of the order to be paid**[Must be your own order]**, please note that it is the id parameter obtained by the interface, the purely numeric one, not the OD1807220151884127 one. To pay multiple orders at the same time, please use English commas to separate them, for example: ```json {type:0, id:"77,88,99"} ``` ## Pay for knowledge paid orders ```json {type:1, id:1234} ``` where id is the numeric number of the knowledge to be paid, same as above ## Send SMS ```json {type:2, smsId:111, mobile:"13500000000", postJsonString:{code:1234, product:"Parameter 2"}} ``` _The above configuration instructions use the SMS message 111 to set up the channel and send SMS messages to 13500000000. The SMS template parameters are: {code:1234, product:"Parameter 2"}_ > Please first enable the "SMS Verification Code" module in the background "Factory settings" --> "Module management" > _In the SMS settings, add an SMS setting of type "normal SMS" (do not set it as a verification code)_ ## Pay registration fee ```json {type:3, id:1234} ``` id is the id of the registration record, not the id of the registration project, don’t make a mistake ## Preferential payment ```json {type:4, shopId: 888, money: consumption amount} ``` Parameter description: + type fixed value 4 + shopId store id, which makes it easier to distinguish the store where the order is made later, and it is convenient to calculate the amount of the order by store in the future. + money For the amount of this consumption, fill in the amount before the discount. Do not fill in the amount after the discount. ## Pay deposit ```json { "type": 5, "amount": deposit amount, "refCode": business number, "remark": remarks, "extJsonStr": JSON format data of extended attributes, } ``` ## Purchase membership ```json { "type": 6, "userLevelPriceId": "The ID of the charging item corresponding to the specified membership level is not the membership level ID, please be careful", "isAutoRenew": "Whether to automatically renew after expiration true/false", "remark": remarks } ``` ## Get the specified coupon ```json { "type": 7, "couponRuleId": 1234, "pwd": "If it is a password coupon, you need to enter the password" } ``` couponRuleId is the coupon rule id ## Pay Jingdong Reward Order ```json { "type": 8, "token": "Token corresponding to Jingdongli order information memory", "couponId": 9908 } ``` token is the corresponding token that is saved in the memory after Jingdong Rewards calls back the payment information; couponId is the coupon used for this payment; ## Catering-Scan the QR code to order-pay the bill ```json { "type": 9, "orderId": 1234, "couponId": 9908 } ``` orderId is the order ID to be paid by scanning the QR code to order, usually a 6-digit number, not a very long order number; couponId is the coupon used for this purchase. If you use multiple coupons, please use English commas to separate them; ## Purchase membership card ```json {type:10, id:1234} ``` where id is the membership card ID ## Pay for image trading orders ```json {type:11, id:1234} ``` where id is the id of the image transaction purchase record ##Buying community group buying leader ```json {type:12} ``` No other parameters are needed, just pass type=12 ## Purchase distributor qualifications ```json {type:13} ``` No other parameters are needed, just pass type=13 ## Purchase a team leader in partner mode ```json {type:14} ``` No other parameters are needed, just pass type=14 ## Purchase partners in partnership mode ```json {type:141} ``` No other parameters are needed, just pass type=141 ## Pay to purchase courseorder ```json {type:15, id:1234} ``` id is the record ID of the purchased course, not the course ID, don’t make a mistake ## Create a new organization [Strictly match according to charging items] ```json {type:16, priceId: 88, name:'Organization Name', remark: 'Organization Remarks'} ``` + priceId is the ID of the organization charging record set in the background + name organization name + remark organizational notes ## Create a new organization [Automatically calculate price per person/duration] ```json {type:161, maxMembers: 88, durationType: 0, duration: 2, name:'Organization Name', remark: 'Organization Remarks'} ``` + maxMembers purchases organization size number of people + durationType duration type 0 days 1 month 2 years + duration duration + name organization name + remark organizational notes ## Upgrade the organization scale [Strictly match according to charging items] ```json {type:17, organizeId: 77, priceId: 88} ``` + organizeId organization ID + priceId is the ID of the organization charging record set in the background ## Upgrade the organization scale [automatically calculate price per person/duration] ```json {type:171, organizeId: 77, addMembers: 88, durationType: 0, addDuration: 2} ``` + organizeId organization ID + addMembers adjusts the number of people, a positive number increases the number of people, a negative number reduces the number of people, 0 does not change the number of people + durationType duration type 0 days 1 month 2 years + addDuration increases the duration, fill in 0 to keep the expiration date unchanged ## Purchase product video episodes ```json {type:18, goodsId: 77, number: 88} ``` + goodsId commodity ID + number Which episode to buy? ## Add clock ```json {type:19, orderAddBellId: 77} ``` + orderAddBellId bell record ID ## Pay for errand task orders ```json {type:20, taskId: 77} ``` + taskId errand task ID ## Purchase the number of unlocks for the blind dating box ```json {type:21, pullTimes: 10} ``` + pullTimes purchase unlock times ## Pay and place the blind box ```json {type:22, boxId: 10} ``` + boxId blind box ID ## cp matching event-paid admission ```json {type:23, cpactivityId: 10} ``` + cpactivityId CP activity ID ## Jingdong takeaway payment ```json {type:24} ``` + For internal use, not available to the public for the time being ## Pay event schedule registration fee ```json {type:25, id: 12334} ``` + type fixed 25 + id is the registration record ID ## Pay ventrata reservation order ```json {type:26, uuid: "5e594938-0fc5-48a8-a5f3-8436ca2246ca"} ``` + type fixed 26 + uuid reservation record ID + resellerReference + firstName + lastName + emailAddress +phoneNumber + country #Variable substitution type == 2, that is to say, when sending text messages, sometimes the parameters may be variables. For example, in the above example, mobile and product may be variables. Then we assume that in the background "System Parameter Configuration", mobile and product are configured as two system parameters, SEND_MOBILE and SMS_PRODUCT_NAME, then the above nextAction can be changed to: ```json {type:2, smsId:111, mobile:{from:"config", key:"SEND_MOBILE"}, postJsonString:{code:1234, product:{from:"config", key:"SMS_PRODUCT_NAME"}}} ``` #Nesting If you need to connect in series, that is, after the payment is completed, first complete the payment for the order, and then send the text message, you can nestnextAction inside nextAction, for example: ```json {type:0, id:129192, nextAction:{type:2, smsId:111, mobile:"13500000000", postJsonString:{code:9988, product:"Factory"}}} ```