ApplePay
Methods#
canMakePayments#
Checks if the device supports Apple Pay and can make payments, based on the supplied options.
Usage#
const { canMakePayments } = await ApplePay.canMakePayments({ merchantIdentifier: merchantIdentifier, supportedNetworks: supportedNetworks,});if (canMakePayments) { // start building a payment request...}Parameters#
| Name | Type |
|---|---|
options | ApplePayAvailabilityOptions |
Returns: Promise<ApplePayCanMakePaymentsResponse>
makePaymentRequest#
Attempts to make request payment by presenting the payment sheet over the app.
Usage#
const request: ApplePayRequest = {...}const { success } = await ApplePay.makePaymentRequest(request);if (success) { alert("Payment successful!");}Parameters#
| Name | Type |
|---|---|
options | ApplePayRequest |
Returns: Promise<ApplePayPaymentRequestResponse>
setLogLevel#
Set the verbosity of event logging.
Parameters#
| Name | Type |
|---|---|
level | LogLevel |
Returns: void