completePayment
Completes the payment authorization with a result.
Declaration
undefined completePayment();Parameters
- result:
The result of the payment authorization, including its status and list of errors. See Applepaypaymentauthorizationresult.
Mentioned in
Discussion
This method must be called by onpaymentauthorized.
Use status values of STATUS_SUCCESS or STATUS_FAILURE only. You should pass in STATUS_FAILURE along with the errors.
completePayment in Apple Pay JS API version 1 and 2
The parameter for completePayment in versions 1 and 2 is the following:
status
The status of the payment, whether it succeeded or failed. See Apple Pay Status Codes.
The Apple Pay payment sheet is dismissed when this method is called with a status value of STATUS_SUCCESS or STATUS_FAILURE. Other status values display an error on the payment sheet to prompt the user to update the information and authenticate again.