@dicty/payment 2.0.6 → 2.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -33
- package/android/build.gradle +0 -6
- package/dist/esm/definitions.js.map +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/provider/react/PaymentPluginProvider.js +5 -4
- package/dist/esm/provider/react/PaymentPluginProvider.js.map +1 -1
- package/dist/esm/web.d.ts +1 -1
- package/dist/esm/web.js.map +1 -1
- package/package.json +8 -8
- package/ios/Sources/PaymentPlugin/Info.plist +0 -24
- /package/android/src/main/java/app/dicty/plugins/{stripe → payment}/GooglePayEvents.java +0 -0
- /package/android/src/main/java/app/dicty/plugins/{stripe → payment}/MetaData.java +0 -0
- /package/android/src/main/java/app/dicty/plugins/{stripe → payment}/PaymentPlugin.java +0 -0
- /package/ios/Tests/PaymentPluginTests/{PaymentPluginTests.swift → PaymentTests.swift} +0 -0
package/README.md
CHANGED
|
@@ -2,45 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
Dicty Payment Plugin for Capacitor apps
|
|
4
4
|
|
|
5
|
-
##
|
|
6
|
-
|
|
7
|
-
`@dicty/payment` bridges Capacitor projects to native Apple in-app purchases and Google Pay flows. It ships with TypeScript definitions, a React context provider, and native shims for iOS, Android, and the web fallback.
|
|
8
|
-
|
|
9
|
-
## Installation
|
|
5
|
+
## Install
|
|
10
6
|
|
|
11
7
|
```bash
|
|
12
8
|
npm install @dicty/payment
|
|
13
9
|
npx cap sync
|
|
14
10
|
```
|
|
15
11
|
|
|
16
|
-
After syncing, open Android Studio/Xcode to let Gradle/CocoaPods refresh native dependencies.
|
|
17
|
-
|
|
18
|
-
## Usage
|
|
19
|
-
|
|
20
|
-
```ts
|
|
21
|
-
import { Payment } from '@dicty/payment';
|
|
22
|
-
|
|
23
|
-
const available = await Payment.isAppleInAppPurchaseAvailable();
|
|
24
|
-
if (available) {
|
|
25
|
-
const { products } = await Payment.getAppleInAppPurchaseProducts({ id: ['premium_monthly'] });
|
|
26
|
-
await Payment.buyAppleInAppPurchase({ id: products[0].id });
|
|
27
|
-
}
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
For React apps, wrap your tree with the provider:
|
|
31
|
-
|
|
32
|
-
```tsx
|
|
33
|
-
import { PaymentPluginProvider } from '@dicty/payment/react';
|
|
34
|
-
|
|
35
|
-
<PaymentPluginProvider>{children}</PaymentPluginProvider>;
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
## Development
|
|
39
|
-
|
|
40
|
-
- `npm run build` cleans, regenerates docs, compiles TypeScript, and bundles output via Rollup.
|
|
41
|
-
- `npm run verify` runs iOS, Android, and web checks; execute before publishing changes.
|
|
42
|
-
- `npm run fmt` formats TypeScript, Java, and Swift sources; `npm run lint` performs the read-only equivalent.
|
|
43
|
-
|
|
44
12
|
## API
|
|
45
13
|
|
|
46
14
|
<docgen-index>
|
package/android/build.gradle
CHANGED
|
@@ -40,12 +40,6 @@ android {
|
|
|
40
40
|
sourceCompatibility JavaVersion.VERSION_21
|
|
41
41
|
targetCompatibility JavaVersion.VERSION_21
|
|
42
42
|
}
|
|
43
|
-
|
|
44
|
-
gradle.projectsEvaluated {
|
|
45
|
-
tasks.withType(JavaCompile) {
|
|
46
|
-
options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation"
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
43
|
}
|
|
50
44
|
|
|
51
45
|
repositories {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"AAsCA,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACtC,SAAS,EAAE,WAAW;IACtB,QAAQ,EAAE,UAAU;IACpB,SAAS,EAAE,WAAW;IACtB,MAAM,EAAE,QAAQ;CACR,CAAC;AAGX,MAAM,CAAC,MAAM,2BAA2B,GAAG;IACzC,GAAG,EAAE,CAAC;IACN,IAAI,EAAE,CAAC;IACP,KAAK,EAAE,CAAC;IACR,IAAI,EAAE,CAAC;CACC,CAAC;AA4DX,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,SAAS,EAAE,WAAW;IACtB,MAAM,EAAE,QAAQ;CACR,CAAC","sourcesContent":["export interface PaymentPlugin {\n /**\n * Check if Apple In-App Purchases are available on this device\n */\n isAppleInAppPurchaseAvailable(): Promise<void>;\n\n /**\n * Get Apple In-App Purchase products by their identifiers\n */\n getAppleInAppPurchaseProducts(\n opts: GetAppleInAppPurchaseProductsOptions,\n ): Promise<GetAppleInAppPurchaseProductsResult>;\n\n /**\n * Purchase an Apple In-App Purchase product\n */\n buyAppleInAppPurchase(opts: BuyAppleInAppPurchaseOptions): Promise<BuyAppleInAppPurchaseResult>;\n\n /**\n * Restore Apple In-App Purchase transactions\n */\n restoreAppleInAppPurchase(): Promise<RestoreAppleInAppPurchaseResult>;\n\n /**\n * Get Apple In-App Purchase receipt data\n */\n getAppleInAppPurchaseReceipt(): Promise<GetAppleInAppPurchaseReceiptResult>;\n\n /**\n * Check if Google Pay is available on this device\n */\n isGooglePayAvailable(): Promise<void>;\n\n /**\n * Handle Google Pay payment flow\n */\n handleGooglePay(opts: GooglePayOptions): Promise<GooglePayResult>;\n}\nexport const AppleInAppPurchaseStatus = {\n Completed: 'completed',\n Restored: 'restored',\n Cancelled: 'cancelled',\n Failed: 'failed',\n} as const;\n\nexport type AppleInAppPurchaseStatus = (typeof AppleInAppPurchaseStatus)[keyof typeof AppleInAppPurchaseStatus];\nexport const AppleSubscriptionPeriodUnit = {\n Day: 0,\n Week: 1,\n Month: 2,\n Year: 3,\n} as const;\n\nexport type AppleSubscriptionPeriodUnit
|
|
1
|
+
{"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"AAsCA,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACtC,SAAS,EAAE,WAAW;IACtB,QAAQ,EAAE,UAAU;IACpB,SAAS,EAAE,WAAW;IACtB,MAAM,EAAE,QAAQ;CACR,CAAC;AAGX,MAAM,CAAC,MAAM,2BAA2B,GAAG;IACzC,GAAG,EAAE,CAAC;IACN,IAAI,EAAE,CAAC;IACP,KAAK,EAAE,CAAC;IACR,IAAI,EAAE,CAAC;CACC,CAAC;AA4DX,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,SAAS,EAAE,WAAW;IACtB,MAAM,EAAE,QAAQ;CACR,CAAC","sourcesContent":["export interface PaymentPlugin {\n /**\n * Check if Apple In-App Purchases are available on this device\n */\n isAppleInAppPurchaseAvailable(): Promise<void>;\n\n /**\n * Get Apple In-App Purchase products by their identifiers\n */\n getAppleInAppPurchaseProducts(\n opts: GetAppleInAppPurchaseProductsOptions,\n ): Promise<GetAppleInAppPurchaseProductsResult>;\n\n /**\n * Purchase an Apple In-App Purchase product\n */\n buyAppleInAppPurchase(opts: BuyAppleInAppPurchaseOptions): Promise<BuyAppleInAppPurchaseResult>;\n\n /**\n * Restore Apple In-App Purchase transactions\n */\n restoreAppleInAppPurchase(): Promise<RestoreAppleInAppPurchaseResult>;\n\n /**\n * Get Apple In-App Purchase receipt data\n */\n getAppleInAppPurchaseReceipt(): Promise<GetAppleInAppPurchaseReceiptResult>;\n\n /**\n * Check if Google Pay is available on this device\n */\n isGooglePayAvailable(): Promise<void>;\n\n /**\n * Handle Google Pay payment flow\n */\n handleGooglePay(opts: GooglePayOptions): Promise<GooglePayResult>;\n}\nexport const AppleInAppPurchaseStatus = {\n Completed: 'completed',\n Restored: 'restored',\n Cancelled: 'cancelled',\n Failed: 'failed',\n} as const;\n\nexport type AppleInAppPurchaseStatus = (typeof AppleInAppPurchaseStatus)[keyof typeof AppleInAppPurchaseStatus];\nexport const AppleSubscriptionPeriodUnit = {\n Day: 0,\n Week: 1,\n Month: 2,\n Year: 3,\n} as const;\n\nexport type AppleSubscriptionPeriodUnit =\n (typeof AppleSubscriptionPeriodUnit)[keyof typeof AppleSubscriptionPeriodUnit];\n\nexport declare type GetAppleInAppPurchaseProductsOptions = {\n id: string[];\n};\n\nexport declare type AppleInAppPurchaseProduct = {\n id: string;\n title: string;\n description: string;\n price: number;\n localizedPrice: string;\n subscriptionPeriod?: {\n value: number;\n unit: AppleSubscriptionPeriodUnit;\n };\n};\n\nexport declare type GetAppleInAppPurchaseProductsResult = {\n products: AppleInAppPurchaseProduct[];\n};\n\nexport declare type BuyAppleInAppPurchaseOptions = {\n id: string;\n};\n\nexport declare type BuyAppleInAppPurchaseResult =\n | CompletedAppleInAppPurchaseResult\n | RestoredAppleInAppPurchaseResult\n | FailedAppleInAppPurchaseResult\n | CancelledAppleInAppPurchaseResult;\n\nexport declare type CompletedAppleInAppPurchaseResult = {\n status: typeof AppleInAppPurchaseStatus.Completed;\n productIdentifier: string;\n transactionIdentifier: string;\n};\n\nexport declare type RestoredAppleInAppPurchaseResult = {\n status: typeof AppleInAppPurchaseStatus.Restored;\n} & Omit<CompletedAppleInAppPurchaseResult, 'status'>;\n\nexport declare type FailedAppleInAppPurchaseResult = {\n status: typeof AppleInAppPurchaseStatus.Failed;\n productIdentifier?: string;\n transactionIdentifier?: string;\n};\n\nexport declare type CancelledAppleInAppPurchaseResult = {\n status: typeof AppleInAppPurchaseStatus.Cancelled;\n} & Omit<FailedAppleInAppPurchaseResult, 'status'>;\n\nexport declare type RestoreAppleInAppPurchaseResult = BuyAppleInAppPurchaseResult;\n\nexport declare type GetAppleInAppPurchaseReceiptResult = {\n receiptData: string;\n};\nexport const GooglePayResults = {\n Completed: 'completed',\n Failed: 'failed',\n} as const;\n\nexport type GooglePayResults = (typeof GooglePayResults)[keyof typeof GooglePayResults];\nexport declare type GooglePayOptions = {\n clientSecret: string;\n};\nexport declare type GooglePayResult = {\n result: GooglePayResults;\n};\nexport declare type PaymentPluginContext = {\n plugin: PaymentPlugin;\n isAppleInAppPurchaseAvailable: boolean;\n isGooglePayAvailable: boolean;\n};\n"]}
|
package/dist/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAIjD,MAAM,OAAO,GAAG,cAAc,CAAgB,SAAS,EAAE;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAIjD,MAAM,OAAO,GAAG,cAAc,CAAgB,SAAS,EAAE;IACvD,GAAG,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC,UAAU,EAAE,CAAC;CAC3D,CAAC,CAAC;AAEH,cAAc,eAAe,CAAC;AAC9B,OAAO,EAAE,OAAO,EAAE,CAAC","sourcesContent":["import { registerPlugin } from '@capacitor/core';\n\nimport type { PaymentPlugin } from './definitions';\n\nconst Payment = registerPlugin<PaymentPlugin>('Payment', {\n web: () => import('./web').then((m) => new m.PaymentWeb()),\n});\n\nexport * from './definitions';\nexport { Payment };\n"]}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { createContext, useContext, useEffect, useState } from 'react';
|
|
2
3
|
import { Payment } from '../../index';
|
|
3
4
|
const PaymentPluginContext = createContext({
|
|
4
5
|
plugin: undefined,
|
|
@@ -41,12 +42,12 @@ export const PaymentPluginProvider = ({ fallback, children }) => {
|
|
|
41
42
|
}
|
|
42
43
|
}, [initialized]);
|
|
43
44
|
if (!plugin) {
|
|
44
|
-
return
|
|
45
|
+
return _jsx(_Fragment, { children: fallback });
|
|
45
46
|
}
|
|
46
|
-
return (
|
|
47
|
+
return (_jsx(PaymentPluginContext.Provider, { value: {
|
|
47
48
|
plugin,
|
|
48
49
|
isGooglePayAvailable,
|
|
49
50
|
isAppleInAppPurchaseAvailable,
|
|
50
|
-
}
|
|
51
|
+
}, children: children }));
|
|
51
52
|
};
|
|
52
53
|
//# sourceMappingURL=PaymentPluginProvider.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PaymentPluginProvider.js","sourceRoot":"","sources":["../../../../src/provider/react/PaymentPluginProvider.tsx"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"PaymentPluginProvider.js","sourceRoot":"","sources":["../../../../src/provider/react/PaymentPluginProvider.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAGvE,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAEtC,MAAM,oBAAoB,GAAG,aAAa,CAA2B;IACnE,MAAM,EAAE,SAAgB;IACxB,6BAA6B,EAAE,KAAK;IACpC,oBAAoB,EAAE,KAAK;CAC5B,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,gBAAgB,GAAG,GAA6B,EAAE;IAC7D,OAAO,UAAU,CAAC,oBAAoB,CAAC,CAAC;AAC1C,CAAC,CAAC;AAMF,MAAM,CAAC,MAAM,qBAAqB,GAAkC,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE,EAAE,EAAE;IAC7F,MAAM,CAAC,6BAA6B,EAAE,8BAA8B,CAAC,GAAG,QAAQ,CAAU,KAAK,CAAC,CAAC;IACjG,MAAM,CAAC,oBAAoB,EAAE,2BAA2B,CAAC,GAAG,QAAQ,CAAU,KAAK,CAAC,CAAC;IACrF,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,EAAiB,CAAC;IACtD,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,QAAQ,CAAU,KAAK,CAAC,CAAC;IAE/D,SAAS,CAAC,GAAG,EAAE;QACb,KAAK,UAAU,UAAU;YACvB,IAAI,4BAA4B,CAAC;YACjC,IAAI,kBAAkB,CAAC;YACvB,IAAI,CAAC;gBACH,MAAM,OAAO,CAAC,6BAA6B,EAAE,CAAC;gBAC9C,4BAA4B,GAAG,IAAI,CAAC;YACtC,CAAC;YAAC,OAAO,CAAC,EAAE,CAAC;gBACX,4BAA4B,GAAG,KAAK,CAAC;YACvC,CAAC;YACD,IAAI,CAAC;gBACH,MAAM,OAAO,CAAC,oBAAoB,EAAE,CAAC;gBACrC,kBAAkB,GAAG,IAAI,CAAC;YAC5B,CAAC;YAAC,OAAO,CAAC,EAAE,CAAC;gBACX,kBAAkB,GAAG,KAAK,CAAC;YAC7B,CAAC;YACD,8BAA8B,CAAC,4BAA4B,CAAC,CAAC;YAC7D,2BAA2B,CAAC,kBAAkB,CAAC,CAAC;YAChD,SAAS,CAAC,OAAO,CAAC,CAAC;QACrB,CAAC;QACD,IAAI,CAAC,WAAW,EAAE,CAAC;YACjB,cAAc,CAAC,IAAI,CAAC,CAAC;YACrB,UAAU,EAAE,CAAC;QACf,CAAC;IACH,CAAC,EAAE,CAAC,WAAW,CAAC,CAAC,CAAC;IAElB,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ,OAAO,4BAAG,QAAQ,GAAI,CAAC;IACzB,CAAC;IACD,OAAO,CACL,KAAC,oBAAoB,CAAC,QAAQ,IAC5B,KAAK,EAAE;YACL,MAAM;YACN,oBAAoB;YACpB,6BAA6B;SAC9B,YAEA,QAAQ,GACqB,CACjC,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import type { FC, PropsWithChildren, ReactNode } from 'react';\nimport { createContext, useContext, useEffect, useState } from 'react';\n\nimport type { PaymentPlugin, PaymentPluginContext as PaymentPluginContextType } from '../../definitions';\nimport { Payment } from '../../index';\n\nconst PaymentPluginContext = createContext<PaymentPluginContextType>({\n plugin: undefined as any,\n isAppleInAppPurchaseAvailable: false,\n isGooglePayAvailable: false,\n});\n\nexport const usePaymentPlugin = (): PaymentPluginContextType => {\n return useContext(PaymentPluginContext);\n};\n\nexport type PaymentPluginProviderType = PropsWithChildren<{\n fallback?: ReactNode;\n}>;\n\nexport const PaymentPluginProvider: FC<PaymentPluginProviderType> = ({ fallback, children }) => {\n const [isAppleInAppPurchaseAvailable, setAppleInAppPurchaseAvailable] = useState<boolean>(false);\n const [isGooglePayAvailable, setGooglePayAvailableStatus] = useState<boolean>(false);\n const [plugin, setPlugin] = useState<PaymentPlugin>();\n const [initialized, setInitialized] = useState<boolean>(false);\n\n useEffect(() => {\n async function initialize() {\n let appleInAppPurchasesAvailable;\n let googlePayAvailable;\n try {\n await Payment.isAppleInAppPurchaseAvailable();\n appleInAppPurchasesAvailable = true;\n } catch (e) {\n appleInAppPurchasesAvailable = false;\n }\n try {\n await Payment.isGooglePayAvailable();\n googlePayAvailable = true;\n } catch (e) {\n googlePayAvailable = false;\n }\n setAppleInAppPurchaseAvailable(appleInAppPurchasesAvailable);\n setGooglePayAvailableStatus(googlePayAvailable);\n setPlugin(Payment);\n }\n if (!initialized) {\n setInitialized(true);\n initialize();\n }\n }, [initialized]);\n\n if (!plugin) {\n return <>{fallback}</>;\n }\n return (\n <PaymentPluginContext.Provider\n value={{\n plugin,\n isGooglePayAvailable,\n isAppleInAppPurchaseAvailable,\n }}\n >\n {children}\n </PaymentPluginContext.Provider>\n );\n};\n"]}
|
package/dist/esm/web.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { WebPlugin } from '@capacitor/core';
|
|
2
|
-
import { BuyAppleInAppPurchaseOptions, BuyAppleInAppPurchaseResult, GetAppleInAppPurchaseProductsOptions, GetAppleInAppPurchaseProductsResult, GetAppleInAppPurchaseReceiptResult, GooglePayOptions, GooglePayResult, PaymentPlugin, RestoreAppleInAppPurchaseResult } from './definitions';
|
|
2
|
+
import type { BuyAppleInAppPurchaseOptions, BuyAppleInAppPurchaseResult, GetAppleInAppPurchaseProductsOptions, GetAppleInAppPurchaseProductsResult, GetAppleInAppPurchaseReceiptResult, GooglePayOptions, GooglePayResult, PaymentPlugin, RestoreAppleInAppPurchaseResult } from './definitions';
|
|
3
3
|
export declare class PaymentWeb extends WebPlugin implements PaymentPlugin {
|
|
4
4
|
/**
|
|
5
5
|
* Apple
|
package/dist/esm/web.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"web.js","sourceRoot":"","sources":["../../src/web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAc5C,MAAM,OAAO,UAAW,SAAQ,SAAS;
|
|
1
|
+
{"version":3,"file":"web.js","sourceRoot":"","sources":["../../src/web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAc5C,MAAM,OAAO,UAAW,SAAQ,SAAS;IACvC;;OAEG;IACH,6BAA6B;QAC3B,OAAO,OAAO,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC;IACzC,CAAC;IACD,6BAA6B,CAC3B,KAA2C;QAE3C,OAAO,OAAO,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC;IACzC,CAAC;IACD,qBAAqB,CAAC,KAAmC;QACvD,OAAO,OAAO,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC;IACzC,CAAC;IACD,yBAAyB;QACvB,OAAO,OAAO,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC;IACzC,CAAC;IACD,4BAA4B;QAC1B,OAAO,OAAO,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC;IACzC,CAAC;IACD;;OAEG;IACH,oBAAoB;QAClB,OAAO,OAAO,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC;IACzC,CAAC;IACD,eAAe,CAAC,KAAuB;QACrC,OAAO,OAAO,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC;IACzC,CAAC;CACF","sourcesContent":["import { WebPlugin } from '@capacitor/core';\n\nimport type {\n BuyAppleInAppPurchaseOptions,\n BuyAppleInAppPurchaseResult,\n GetAppleInAppPurchaseProductsOptions,\n GetAppleInAppPurchaseProductsResult,\n GetAppleInAppPurchaseReceiptResult,\n GooglePayOptions,\n GooglePayResult,\n PaymentPlugin,\n RestoreAppleInAppPurchaseResult,\n} from './definitions';\n\nexport class PaymentWeb extends WebPlugin implements PaymentPlugin {\n /**\n * Apple\n */\n isAppleInAppPurchaseAvailable(): Promise<void> {\n return Promise.reject('Not supported');\n }\n getAppleInAppPurchaseProducts(\n _opts: GetAppleInAppPurchaseProductsOptions,\n ): Promise<GetAppleInAppPurchaseProductsResult> {\n return Promise.reject('Not supported');\n }\n buyAppleInAppPurchase(_opts: BuyAppleInAppPurchaseOptions): Promise<BuyAppleInAppPurchaseResult> {\n return Promise.reject('Not supported');\n }\n restoreAppleInAppPurchase(): Promise<RestoreAppleInAppPurchaseResult> {\n return Promise.reject('Not supported');\n }\n getAppleInAppPurchaseReceipt(): Promise<GetAppleInAppPurchaseReceiptResult> {\n return Promise.reject('Not supported');\n }\n /**\n * Google\n */\n isGooglePayAvailable(): Promise<void> {\n return Promise.reject('Not supported');\n }\n handleGooglePay(_opts: GooglePayOptions): Promise<GooglePayResult> {\n return Promise.reject('Not supported');\n }\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dicty/payment",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.8",
|
|
4
4
|
"description": "Dicty Payment plugin",
|
|
5
|
-
"type": "module",
|
|
6
5
|
"main": "dist/plugin.cjs.js",
|
|
7
6
|
"module": "dist/esm/index.js",
|
|
8
7
|
"types": "dist/esm/index.d.ts",
|
|
@@ -16,7 +15,7 @@
|
|
|
16
15
|
"Package.swift",
|
|
17
16
|
"DictyPayment.podspec"
|
|
18
17
|
],
|
|
19
|
-
"author": "
|
|
18
|
+
"author": "dicty team",
|
|
20
19
|
"license": "MIT",
|
|
21
20
|
"repository": {
|
|
22
21
|
"type": "git",
|
|
@@ -55,16 +54,17 @@
|
|
|
55
54
|
"@ionic/prettier-config": "^4.0.0",
|
|
56
55
|
"@ionic/swiftlint-config": "^2.0.0",
|
|
57
56
|
"@types/react": "^19.2.7",
|
|
58
|
-
"@typescript-eslint/eslint-plugin": "^8.50.1",
|
|
59
|
-
"@typescript-eslint/parser": "^8.50.1",
|
|
60
57
|
"eslint": "^8.57.1",
|
|
61
|
-
"prettier": "^3.
|
|
58
|
+
"prettier": "^3.6.2",
|
|
62
59
|
"prettier-plugin-java": "^2.7.7",
|
|
63
|
-
"rimraf": "^6.1.
|
|
64
|
-
"rollup": "^4.
|
|
60
|
+
"rimraf": "^6.1.0",
|
|
61
|
+
"rollup": "^4.53.2",
|
|
65
62
|
"swiftlint": "^2.0.0",
|
|
66
63
|
"typescript": "^5.9.3"
|
|
67
64
|
},
|
|
65
|
+
"peerDependencies": {
|
|
66
|
+
"@capacitor/core": ">=8.0.0"
|
|
67
|
+
},
|
|
68
68
|
"prettier": "@ionic/prettier-config",
|
|
69
69
|
"swiftlint": "@ionic/swiftlint-config",
|
|
70
70
|
"eslintConfig": {
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
3
|
-
<plist version="1.0">
|
|
4
|
-
<dict>
|
|
5
|
-
<key>CFBundleDevelopmentRegion</key>
|
|
6
|
-
<string>$(DEVELOPMENT_LANGUAGE)</string>
|
|
7
|
-
<key>CFBundleExecutable</key>
|
|
8
|
-
<string>$(EXECUTABLE_NAME)</string>
|
|
9
|
-
<key>CFBundleIdentifier</key>
|
|
10
|
-
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
|
11
|
-
<key>CFBundleInfoDictionaryVersion</key>
|
|
12
|
-
<string>6.0</string>
|
|
13
|
-
<key>CFBundleName</key>
|
|
14
|
-
<string>$(PRODUCT_NAME)</string>
|
|
15
|
-
<key>CFBundlePackageType</key>
|
|
16
|
-
<string>FMWK</string>
|
|
17
|
-
<key>CFBundleShortVersionString</key>
|
|
18
|
-
<string>1.0</string>
|
|
19
|
-
<key>CFBundleVersion</key>
|
|
20
|
-
<string>$(CURRENT_PROJECT_VERSION)</string>
|
|
21
|
-
<key>NSPrincipalClass</key>
|
|
22
|
-
<string></string>
|
|
23
|
-
</dict>
|
|
24
|
-
</plist>
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|