0.0.24 • Published 10 months ago
@paulmojicatech/apple-pay v0.0.24
apple-pay
Capacitor plugin to integrate Apple Pay into application
Install
npm install @paulmojicatech/apple-pay
npx cap sync
API
echo(...)
canMakePayments()
showApplePaySheet(...)
showInAppPurchaseSheet(...)
addListener(string, ...)
restoreInAppPurchase()
- Interfaces
- Type Aliases
echo(...)
echo(options: { value: string; }) => Promise<{ value: string; }>
Param | Type |
---|---|
options | { value: string; } |
Returns: Promise<{ value: string; }>
canMakePayments()
canMakePayments() => Promise<{ canMakePayments: boolean; }>
Returns: Promise<{ canMakePayments: boolean; }>
showApplePaySheet(...)
showApplePaySheet(options: ApplePayRequestOptions) => Promise<{ success: boolean; }>
Param | Type |
---|---|
options | ApplePayRequestOptions |
Returns: Promise<{ success: boolean; }>
showInAppPurchaseSheet(...)
showInAppPurchaseSheet(options: { productIdentifiers: string[]; }) => Promise<{ success: boolean; }>
Param | Type |
---|---|
options | { productIdentifiers: string[]; } |
Returns: Promise<{ success: boolean; }>
addListener(string, ...)
addListener(eventName: string, listenerFunc: ListenerCallback) => Promise<PluginListenerHandle>
Param | Type |
---|---|
eventName | string |
listenerFunc | ListenerCallback |
Returns: Promise<PluginListenerHandle>
restoreInAppPurchase()
restoreInAppPurchase() => Promise<{ success: boolean; }>
Returns: Promise<{ success: boolean; }>
Interfaces
ApplePayRequestOptions
Prop | Type |
---|---|
merchantId | string |
countryCode | string |
currencyCode | string |
supportedNetworks | string[] |
merchantCapabilities | string[] |
paymentSummaryItems | PaymentSummaryItem[] |
recurringSummaryItems | RecurrentPaymentSummaryItem[] |
PaymentSummaryItem
Prop | Type |
---|---|
label | string |
amount | string |
RecurrentPaymentSummaryItem
Prop | Type |
---|---|
startDate | string |
intervalUnit | RecurringPaymentIntervalUnit |
managementURL | string |
intervalCount | number |
PluginListenerHandle
Prop | Type |
---|---|
remove | () => Promise<void> |
Type Aliases
RecurringPaymentIntervalUnit
'day' | 'week' | 'month' | 'year'
ListenerCallback
(err: any, ...args: any[]): void