my.tradePay

Start a payment transaction.

Sample Code

copy
my.tradePay({
  tradeNO: '201711152100110410533667792', // get the tradeNo from the server first
  success: (res) => {
    my.alert({
      content: JSON.stringify(res),
    });
  },
  fail: (res) => {
    my.alert({
      content: JSON.stringify(res),
    });
  }
});

Parameters

FieldTypeMandatoryDescription
tradeNOStringNThe trade number
orderStrStringNA string of complete payment parameters, which is recommended to be obtained from the server
paymentUrlStringNThe url of payment page

Success Callback Function

The incoming parameter is of the Object type with the following attributes:

FieldTypeMandatoryDescription
resultCodeStringYThe result code of the pay process

Result Code

resultCodeDescription
9000Pay success
8000Trade is processing
4000Pay failed
6001User cancel to pay
6002Network exception
6004Unknown pay result, may be success
99User click forget password button and quite the pay page(iOS only)