Initializes the payment response.
Arguments
- paymentResponse -
Array<PaymentMethodData>
Example
const PAYMENT_RESPONSE = {
requestId: 'demo',
methodName: 'apple-pay',
details: {
transactionIdentifier: 'some-id',
paymentData: {}
}
};
const paymentResponse = new PaymentResponse(PAYMENT_RESPONSE);
Displays a success/failure animation and dismisses the payment request based on the payment status provided.
Arguments
- paymentStatus -
PaymentComplete
Example
paymentResponse.complete('success');
Example
console.log(paymentResponse.methodName); // apple-pay
Example
console.log(paymentResponse.details); // {}
Example
console.log(paymentResponse.shippingAddress); // null
Example
console.log(paymentResponse.shippingOption); // null
Example
console.log(paymentResponse.payerName); // null
Example
console.log(paymentResponse.payerEmail); // null
Example
console.log(paymentResponse.payerPhone); // null
Example
console.log(paymentResponse.requestId); // demo