🚀 DAY 5 OF LAUNCH WEEK:Introducing Webhook Events for Alert Changes.Learn more →
Socket
Book a DemoInstallSign in
Socket

capacitor-jd-apple-pay

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

capacitor-jd-apple-pay

This plugin offers intuitive interfaces enabling you to seamlessly trigger an Apple Pay payment sheet.

latest
Source
npmnpm
Version
0.0.3
Version published
Maintainers
1
Created
Source

capacitor-jd-apple-pay

This plugin serves as a wrapper for Apple Pay, facilitating the generation of an Apple Pay token and its subsequent transmission to the backend.

Feel free to open new PRs.. :)

Supported Platforms

  • iOS

Features

  • Wallet Availability Check: Verify whether the Apple Wallet is available on the device.
  • Payment Request: Initiate a payment request through Apple Pay and retrieve the payment token.
  • Payment Completion: Finalize the payment process after the token has been successfully sent to the backend.

Todo

  • Create tests.
  • Add support for ApplePayShippingContact.
  • Add support for ApplePayShippingMethod.

Install

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

API

  • canMakePayment()
  • completePayment(...)
  • requestPayment(...)
  • Interfaces
  • Type Aliases

canMakePayment()

canMakePayment() => Promise<{ success: boolean; }>

Returns: Promise<{ success: boolean; }>

completePayment(...)

completePayment(params: ApplePayCompleteRequest) => Promise<void>
ParamType
paramsApplePayCompleteRequest

requestPayment(...)

requestPayment(params: ApplePayPaymentRequest) => Promise<ApplePayResponseRequest>
ParamType
paramsApplePayPaymentRequest

Returns: Promise<ApplePayResponseRequest>

Interfaces

ApplePayCompleteRequest

PropType
status'success' | 'failure'

ApplePayResponseRequest

PropType
paymentDatastring
transactionIdentifierstring

ApplePayPaymentRequest

PropType
merchantIdentifierstring
merchantCapabilitiesApplePayMerchantCapability[]
supportedNetworksApplePaySupportedNetworks[]
totalApplePayLineItem
countryCodestring
currencyCodestring

Type Aliases

ApplePayMerchantCapability

'supports3DS' | 'supportsCredit' | 'supportsDebit'

ApplePaySupportedNetworks

'amex' | 'discover' | 'JCB' | 'masterCard' | 'mada' | 'visa'

ApplePayLineItem

{ amount: string; label: string; }

Author

  • Juan David - Initial work - juandl

Keywords

capacitor

FAQs

Package last updated on 19 Dec 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts