Completes the payment authorization with a result.
SDKs
- Safari Desktop 10.0+
- Safari Mobile 10.0+
Framework
- Apple Pay JS
Declaration
void completePayment(Apple Pay Payment Authorization Result result);
Parameters
result
The result of the payment authorization, including its status and list of errors. See
Apple
.Pay Payment Authorization Result
Discussion
This method must be called by onpaymentauthorized
.
Use status values of STATUS
or STATUS
only. You should pass in STATUS
along with the errors.
completePayment in Apple Pay JS API version 1 and 2
The parameter for complete
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
or STATUS
. Other status values display an error on the payment sheet to prompt the user to update the information and authenticate again.