0.0.3 • Published 3 years ago

capacitor-apple-pay-plugin v0.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

capacitor-apple-pay-plugin

A Capacitor plugin for Apple Pay

Install

npm install capacitor-apple-pay-plugin
npx cap sync

API

canMakePayments()

canMakePayments() => Promise<{ isPayment: boolean; }>

Returns: Promise<{ isPayment: boolean; }>


canMakePayments(...)

canMakePayments(options: CanMakePaymentsNetworks) => Promise<{ isPayment: boolean; }>
ParamType
optionsCanMakePaymentsNetworks

Returns: Promise<{ isPayment: boolean; }>


makePaymentRequest(...)

makePaymentRequest(request: PaymentRequest) => Promise<PaymentResponse>
ParamType
requestPaymentRequest

Returns: Promise<PaymentResponse>


completeLastTransaction(...)

completeLastTransaction(options: { status: string; }) => Promise<void>
ParamType
options{ status: string; }

Interfaces

CanMakePaymentsNetworks

PropType
usingNetworksPaymentNetwork[]
capabilitiesMerchantCapability[]

PaymentResponse

PropType
token{ paymentData?: string; transactionIdentifier: string; paymentMethod: { displayName?: string; secureElementPass?: { deviceAccountNumberSuffix: string; deviceAccountIdentifier: string; primaryAccountIdentifier: string; primaryAccountNumberSuffix: string; devicePassIdentifier?: string; pairedTerminalIdentifier?: string; }; }; }

PaymentRequest

PropType
merchantIdentifierstring
countryCodestring
currencyCodestring
supportedCountriesstring[]
supportedNetworksPaymentNetwork[]
paymentSummaryItemsPaymentSummaryItem[]
requiredShippingContactFieldsContactField[]
requiredBillingContactFieldsContactField[]
merchantCapabilitiesMerchantCapability[]
billingContactPaymentContact
shippingContactPaymentContact

PaymentSummaryItem

PropType
labelstring
amountnumber
typePaymentSummaryItemType

PaymentContact

PropType
emailAddressstring
phoneNumberstring
namePersonNameComponents
postalAddress{ street?: string; city?: string; postalCode?: string; country?: string; isoCountryCode?: string; subAdministrativeArea?: string; subLocality?: string; }

PersonNameComponents

PropType
familyNamestring
givenNamestring
namePrefixstring
middleNamestring
nameSuffixstring
nicknamestring
phoneticRepresentationPersonNameComponents

Type Aliases

PaymentNetwork

'masterCard' | 'visa' | 'amex' | 'quicPay' | 'chinaUnionPay' | 'discover' | 'interac' | 'privateLabel'

MerchantCapability

'capability3DS' | 'capabilityCredit' | 'capabilityDebit' | 'capabilityEMV'

PaymentSummaryItemType

'pending' | 'final'

ContactField

'emailAddress' | 'name' | 'phoneNumber' | 'phoneticName' | 'postalAddress'