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