@dicty/payment
v1.1.2
Published
Dicty Payment plugin
Downloads
4
Readme
@dicty/payment
Dicty Stripe plugin
Install
npm install @dicty/payment
npx cap sync
API
isAppleInAppPurchaseAvailable()
getAppleInAppPurchaseProducts(...)
buyAppleInAppPurchase(...)
restoreAppleInAppPurchase()
getAppleInAppPurchaseReceipt()
isGooglePayAvailable()
handleGooglePay(...)
- Interfaces
- Enums
isAppleInAppPurchaseAvailable()
isAppleInAppPurchaseAvailable() => Promise<void>
getAppleInAppPurchaseProducts(...)
getAppleInAppPurchaseProducts(opts: GetAppleInAppPurchaseProductsOptions) => Promise<GetAppleInAppPurchaseProductsResult>
| Param | Type |
| ---------- | ----------------------------------------------------------------------------------------------------- |
| opts
| GetAppleInAppPurchaseProductsOptions |
Returns: Promise<GetAppleInAppPurchaseProductsResult>
buyAppleInAppPurchase(...)
buyAppleInAppPurchase(opts: BuyAppleInAppPurchaseOptions) => Promise<BuyAppleInAppPurchaseResult>
| Param | Type |
| ---------- | ------------------------------------------------------------------------------------- |
| opts
| BuyAppleInAppPurchaseOptions |
Returns: Promise<BuyAppleInAppPurchaseResult>
restoreAppleInAppPurchase()
restoreAppleInAppPurchase() => Promise<RestoreAppleInAppPurchaseResult>
Returns: Promise<RestoreAppleInAppPurchaseResult>
getAppleInAppPurchaseReceipt()
getAppleInAppPurchaseReceipt() => Promise<GetAppleInAppPurchaseReceiptResult>
Returns: Promise<GetAppleInAppPurchaseReceiptResult>
isGooglePayAvailable()
isGooglePayAvailable() => Promise<void>
handleGooglePay(...)
handleGooglePay(opts: GooglePayOptions) => Promise<GooglePayResult>
| Param | Type |
| ---------- | ------------------------------------------------------------- |
| opts
| GooglePayOptions |
Returns: Promise<GooglePayResult>
Interfaces
GetAppleInAppPurchaseProductsResult
| Prop | Type |
| -------------- | ---------------------------------------- |
| products
| AppleInAppPurchaseProduct[] |
AppleInAppPurchaseProduct
| Prop | Type |
| ------------------------ | ------------------------------------------------------------------------------------------------------------- |
| id
| string |
| title
| string |
| description
| string |
| price
| number |
| priceLocale
| string |
| subscriptionPeriod
| { value: number; unit: AppleSubscriptionPeriodUnit; } |
GetAppleInAppPurchaseProductsOptions
| Prop | Type |
| -------- | --------------------- |
| id
| string[] |
BuyAppleInAppPurchaseResult
| Prop | Type |
| --------------------------- | ----------------------------------------------------------------------------- |
| status
| AppleInAppPurchaseStatus |
| productIdentifier
| string |
| transactionIdentifier
| string |
BuyAppleInAppPurchaseOptions
| Prop | Type |
| -------- | ------------------- |
| id
| string |
RestoreAppleInAppPurchaseResult
| Prop | Type |
| --------------------------- | ----------------------------------------------------------------------------- |
| status
| AppleInAppPurchaseStatus |
| productIdentifier
| string |
| transactionIdentifier
| string |
GetAppleInAppPurchaseReceiptResult
| Prop | Type |
| ----------------- | ------------------- |
| receiptData
| string |
GooglePayResult
| Prop | Type |
| ------------ | ------------------------------------------------------------- |
| result
| GooglePayResults |
GooglePayOptions
| Prop | Type |
| ------------------ | ------------------- |
| clientSecret
| string |
Enums
AppleSubscriptionPeriodUnit
| Members |
| ----------- |
| Day
|
| Week
|
| Month
|
| Year
|
AppleInAppPurchaseStatus
| Members | Value |
| --------------- | ------------------------ |
| Completed
| 'completed' |
| Restored
| 'restored' |
| Cancelled
| 'cancelled' |
| Failed
| 'failed' |
GooglePayResults
| Members | Value |
| --------------- | ------------------------ |
| Completed
| 'completed' |
| Failed
| 'failed' |