@acmekit/utils 2.13.1 → 2.13.3
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/dist/bundles.d.ts +0 -7
- package/dist/bundles.d.ts.map +1 -1
- package/dist/bundles.js +1 -8
- package/dist/bundles.js.map +1 -1
- package/dist/common/define-config.d.ts.map +1 -1
- package/dist/common/define-config.js +2 -49
- package/dist/common/define-config.js.map +1 -1
- package/dist/index.d.ts +0 -9
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +0 -9
- package/dist/index.js.map +1 -1
- package/dist/link/links.d.ts +0 -21
- package/dist/link/links.d.ts.map +1 -1
- package/dist/link/links.js +0 -21
- package/dist/link/links.js.map +1 -1
- package/dist/modules-sdk/definition.d.ts +0 -39
- package/dist/modules-sdk/definition.d.ts.map +1 -1
- package/dist/modules-sdk/definition.js +0 -26
- package/dist/modules-sdk/definition.js.map +1 -1
- package/dist/modules-sdk/modules-to-container-types.d.ts.map +1 -1
- package/dist/modules-sdk/modules-to-container-types.js +0 -13
- package/dist/modules-sdk/modules-to-container-types.js.map +1 -1
- package/dist/translations/index.d.ts +0 -1
- package/dist/translations/index.d.ts.map +1 -1
- package/dist/translations/index.js +0 -1
- package/dist/translations/index.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -3
- package/dist/fulfillment/events.d.ts +0 -77
- package/dist/fulfillment/events.d.ts.map +0 -1
- package/dist/fulfillment/events.js +0 -117
- package/dist/fulfillment/events.js.map +0 -1
- package/dist/fulfillment/geo-zone.d.ts +0 -7
- package/dist/fulfillment/geo-zone.d.ts.map +0 -1
- package/dist/fulfillment/geo-zone.js +0 -11
- package/dist/fulfillment/geo-zone.js.map +0 -1
- package/dist/fulfillment/index.d.ts +0 -5
- package/dist/fulfillment/index.d.ts.map +0 -1
- package/dist/fulfillment/index.js +0 -21
- package/dist/fulfillment/index.js.map +0 -1
- package/dist/fulfillment/provider.d.ts +0 -394
- package/dist/fulfillment/provider.d.ts.map +0 -1
- package/dist/fulfillment/provider.js +0 -412
- package/dist/fulfillment/provider.js.map +0 -1
- package/dist/fulfillment/shipping-options.d.ts +0 -5
- package/dist/fulfillment/shipping-options.d.ts.map +0 -1
- package/dist/fulfillment/shipping-options.js +0 -9
- package/dist/fulfillment/shipping-options.js.map +0 -1
- package/dist/inventory/events.d.ts +0 -26
- package/dist/inventory/events.d.ts.map +0 -1
- package/dist/inventory/events.js +0 -40
- package/dist/inventory/events.js.map +0 -1
- package/dist/inventory/index.d.ts +0 -2
- package/dist/inventory/index.d.ts.map +0 -1
- package/dist/inventory/index.js +0 -18
- package/dist/inventory/index.js.map +0 -1
- package/dist/order/index.d.ts +0 -4
- package/dist/order/index.d.ts.map +0 -1
- package/dist/order/index.js +0 -20
- package/dist/order/index.js.map +0 -1
- package/dist/order/order-change-action.d.ts +0 -25
- package/dist/order/order-change-action.d.ts.map +0 -1
- package/dist/order/order-change-action.js +0 -29
- package/dist/order/order-change-action.js.map +0 -1
- package/dist/order/order-change.d.ts +0 -31
- package/dist/order/order-change.d.ts.map +0 -1
- package/dist/order/order-change.js +0 -36
- package/dist/order/order-change.js.map +0 -1
- package/dist/order/status.d.ts +0 -85
- package/dist/order/status.d.ts.map +0 -1
- package/dist/order/status.js +0 -92
- package/dist/order/status.js.map +0 -1
- package/dist/payment/abstract-payment-provider.d.ts +0 -632
- package/dist/payment/abstract-payment-provider.d.ts.map +0 -1
- package/dist/payment/abstract-payment-provider.js +0 -110
- package/dist/payment/abstract-payment-provider.js.map +0 -1
- package/dist/payment/index.d.ts +0 -5
- package/dist/payment/index.d.ts.map +0 -1
- package/dist/payment/index.js +0 -21
- package/dist/payment/index.js.map +0 -1
- package/dist/payment/payment-collection.d.ts +0 -40
- package/dist/payment/payment-collection.d.ts.map +0 -1
- package/dist/payment/payment-collection.js +0 -44
- package/dist/payment/payment-collection.js.map +0 -1
- package/dist/payment/payment-session.d.ts +0 -32
- package/dist/payment/payment-session.d.ts.map +0 -1
- package/dist/payment/payment-session.js +0 -36
- package/dist/payment/payment-session.js.map +0 -1
- package/dist/payment/webhook.d.ts +0 -37
- package/dist/payment/webhook.d.ts.map +0 -1
- package/dist/payment/webhook.js +0 -42
- package/dist/payment/webhook.js.map +0 -1
- package/dist/pricing/builders.d.ts +0 -10
- package/dist/pricing/builders.d.ts.map +0 -1
- package/dist/pricing/builders.js +0 -53
- package/dist/pricing/builders.js.map +0 -1
- package/dist/pricing/enums.d.ts +0 -8
- package/dist/pricing/enums.d.ts.map +0 -1
- package/dist/pricing/enums.js +0 -12
- package/dist/pricing/enums.js.map +0 -1
- package/dist/pricing/events.d.ts +0 -38
- package/dist/pricing/events.d.ts.map +0 -1
- package/dist/pricing/events.js +0 -50
- package/dist/pricing/events.js.map +0 -1
- package/dist/pricing/index.d.ts +0 -5
- package/dist/pricing/index.d.ts.map +0 -1
- package/dist/pricing/index.js +0 -21
- package/dist/pricing/index.js.map +0 -1
- package/dist/pricing/price-list.d.ts +0 -9
- package/dist/pricing/price-list.d.ts.map +0 -1
- package/dist/pricing/price-list.js +0 -14
- package/dist/pricing/price-list.js.map +0 -1
- package/dist/product/csv-normalizer.d.ts +0 -43
- package/dist/product/csv-normalizer.d.ts.map +0 -1
- package/dist/product/csv-normalizer.js +0 -382
- package/dist/product/csv-normalizer.js.map +0 -1
- package/dist/product/enums.d.ts +0 -7
- package/dist/product/enums.d.ts.map +0 -1
- package/dist/product/enums.js +0 -11
- package/dist/product/enums.js.map +0 -1
- package/dist/product/events.d.ts +0 -62
- package/dist/product/events.d.ts.map +0 -1
- package/dist/product/events.js +0 -88
- package/dist/product/events.js.map +0 -1
- package/dist/product/get-variant-availability.d.ts +0 -59
- package/dist/product/get-variant-availability.d.ts.map +0 -1
- package/dist/product/get-variant-availability.js +0 -111
- package/dist/product/get-variant-availability.js.map +0 -1
- package/dist/product/index.d.ts +0 -6
- package/dist/product/index.d.ts.map +0 -1
- package/dist/product/index.js +0 -45
- package/dist/product/index.js.map +0 -1
- package/dist/product/validators.d.ts +0 -894
- package/dist/product/validators.d.ts.map +0 -1
- package/dist/product/validators.js +0 -163
- package/dist/product/validators.js.map +0 -1
- package/dist/promotion/index.d.ts +0 -57
- package/dist/promotion/index.d.ts.map +0 -1
- package/dist/promotion/index.js +0 -70
- package/dist/promotion/index.js.map +0 -1
- package/dist/shipping/index.d.ts +0 -6
- package/dist/shipping/index.d.ts.map +0 -1
- package/dist/shipping/index.js +0 -10
- package/dist/shipping/index.js.map +0 -1
- package/dist/totals/adjustment/index.d.ts +0 -16
- package/dist/totals/adjustment/index.d.ts.map +0 -1
- package/dist/totals/adjustment/index.js +0 -49
- package/dist/totals/adjustment/index.js.map +0 -1
- package/dist/totals/cart/index.d.ts +0 -40
- package/dist/totals/cart/index.d.ts.map +0 -1
- package/dist/totals/cart/index.js +0 -165
- package/dist/totals/cart/index.js.map +0 -1
- package/dist/totals/create-raw-properties-from-bignumber.d.ts +0 -5
- package/dist/totals/create-raw-properties-from-bignumber.d.ts.map +0 -1
- package/dist/totals/create-raw-properties-from-bignumber.js +0 -52
- package/dist/totals/create-raw-properties-from-bignumber.js.map +0 -1
- package/dist/totals/credit-lines/index.d.ts +0 -14
- package/dist/totals/credit-lines/index.d.ts.map +0 -1
- package/dist/totals/credit-lines/index.js +0 -46
- package/dist/totals/credit-lines/index.js.map +0 -1
- package/dist/totals/index.d.ts +0 -9
- package/dist/totals/index.d.ts.map +0 -1
- package/dist/totals/index.js +0 -25
- package/dist/totals/index.js.map +0 -1
- package/dist/totals/line-item/index.d.ts +0 -48
- package/dist/totals/line-item/index.d.ts.map +0 -1
- package/dist/totals/line-item/index.js +0 -123
- package/dist/totals/line-item/index.js.map +0 -1
- package/dist/totals/math.d.ts +0 -26
- package/dist/totals/math.d.ts.map +0 -1
- package/dist/totals/math.js +0 -107
- package/dist/totals/math.js.map +0 -1
- package/dist/totals/promotion/index.d.ts +0 -5
- package/dist/totals/promotion/index.d.ts.map +0 -1
- package/dist/totals/promotion/index.js +0 -124
- package/dist/totals/promotion/index.js.map +0 -1
- package/dist/totals/shipping-method/index.d.ts +0 -28
- package/dist/totals/shipping-method/index.d.ts.map +0 -1
- package/dist/totals/shipping-method/index.js +0 -59
- package/dist/totals/shipping-method/index.js.map +0 -1
- package/dist/totals/tax/index.d.ts +0 -16
- package/dist/totals/tax/index.d.ts.map +0 -1
- package/dist/totals/tax/index.js +0 -37
- package/dist/totals/tax/index.js.map +0 -1
- package/dist/totals/transform-properties-to-bignumber.d.ts +0 -6
- package/dist/totals/transform-properties-to-bignumber.d.ts.map +0 -1
- package/dist/totals/transform-properties-to-bignumber.js +0 -40
- package/dist/totals/transform-properties-to-bignumber.js.map +0 -1
- package/dist/translations/apply-translations-to-tax-lines.d.ts +0 -12
- package/dist/translations/apply-translations-to-tax-lines.d.ts.map +0 -1
- package/dist/translations/apply-translations-to-tax-lines.js +0 -38
- package/dist/translations/apply-translations-to-tax-lines.js.map +0 -1
|
@@ -1,632 +0,0 @@
|
|
|
1
|
-
import { IPaymentProvider, ProviderWebhookPayload, WebhookActionResult, CapturePaymentInput, CapturePaymentOutput, AuthorizePaymentInput, AuthorizePaymentOutput, CancelPaymentInput, CancelPaymentOutput, InitiatePaymentInput, InitiatePaymentOutput, DeletePaymentInput, DeletePaymentOutput, GetPaymentStatusInput, GetPaymentStatusOutput, RefundPaymentInput, RefundPaymentOutput, RetrievePaymentInput, RetrievePaymentOutput, UpdatePaymentInput, UpdatePaymentOutput } from "@acmekit/types";
|
|
2
|
-
export declare abstract class AbstractPaymentProvider<TConfig = Record<string, unknown>> implements IPaymentProvider {
|
|
3
|
-
/**
|
|
4
|
-
* @ignore
|
|
5
|
-
*/
|
|
6
|
-
protected readonly config: TConfig;
|
|
7
|
-
/**
|
|
8
|
-
* @ignore
|
|
9
|
-
*/
|
|
10
|
-
protected readonly container: Record<string, unknown>;
|
|
11
|
-
/**
|
|
12
|
-
* This method validates the options of the provider set in `acmekit-config.ts`.
|
|
13
|
-
* Implementing this method is optional, but it's useful to ensure that the required
|
|
14
|
-
* options are passed to the provider, or if you have any custom validation logic.
|
|
15
|
-
*
|
|
16
|
-
* If the options aren't valid, throw an error.
|
|
17
|
-
*
|
|
18
|
-
* @param options - The provider's options passed in `acmekit-config.ts`.
|
|
19
|
-
*
|
|
20
|
-
* @example
|
|
21
|
-
* class MyPaymentProviderService extends AbstractPaymentProvider<Options> {
|
|
22
|
-
* static validateOptions(options: Record<any, any>) {
|
|
23
|
-
* if (!options.apiKey) {
|
|
24
|
-
* throw new AcmeKitError(
|
|
25
|
-
* AcmeKitError.Types.INVALID_DATA,
|
|
26
|
-
* "API key is required in the provider's options."
|
|
27
|
-
* )
|
|
28
|
-
* }
|
|
29
|
-
* }
|
|
30
|
-
* }
|
|
31
|
-
*/
|
|
32
|
-
static validateOptions(options: Record<any, any>): void | never;
|
|
33
|
-
/**
|
|
34
|
-
* The constructor allows you to access resources from the [module's container](https://docs.acmekit.com/learn/fundamentals/modules/container)
|
|
35
|
-
* using the first parameter, and the module's options using the second parameter.
|
|
36
|
-
*
|
|
37
|
-
* If you're creating a client or establishing a connection with a third-party service, do it in the constructor.
|
|
38
|
-
*
|
|
39
|
-
* :::note
|
|
40
|
-
*
|
|
41
|
-
* A module's options are passed when you register it in the AcmeKit application.
|
|
42
|
-
*
|
|
43
|
-
* :::
|
|
44
|
-
*
|
|
45
|
-
* @param {Record<string, unknown>} cradle - The module's container used to resolve resources.
|
|
46
|
-
* @param {Record<string, unknown>} config - The options passed to the Payment Module provider.
|
|
47
|
-
* @typeParam TConfig - The type of the provider's options passed as a second parameter.
|
|
48
|
-
*
|
|
49
|
-
* @example
|
|
50
|
-
* import { AbstractPaymentProvider } from "@acmekit/framework/utils"
|
|
51
|
-
* import { Logger } from "@acmekit/framework/types"
|
|
52
|
-
*
|
|
53
|
-
* type Options = {
|
|
54
|
-
* apiKey: string
|
|
55
|
-
* }
|
|
56
|
-
*
|
|
57
|
-
* type InjectedDependencies = {
|
|
58
|
-
* logger: Logger
|
|
59
|
-
* }
|
|
60
|
-
*
|
|
61
|
-
* class MyPaymentProviderService extends AbstractPaymentProvider<Options> {
|
|
62
|
-
* protected logger_: Logger
|
|
63
|
-
* protected options_: Options
|
|
64
|
-
* // assuming you're initializing a client
|
|
65
|
-
* protected client
|
|
66
|
-
*
|
|
67
|
-
* constructor(
|
|
68
|
-
* container: InjectedDependencies,
|
|
69
|
-
* options: Options
|
|
70
|
-
* ) {
|
|
71
|
-
* super(container, options)
|
|
72
|
-
*
|
|
73
|
-
* this.logger_ = container.logger
|
|
74
|
-
* this.options_ = options
|
|
75
|
-
*
|
|
76
|
-
* // TODO initialize your client
|
|
77
|
-
* }
|
|
78
|
-
* // ...
|
|
79
|
-
* }
|
|
80
|
-
*
|
|
81
|
-
* export default MyPaymentProviderService
|
|
82
|
-
*/
|
|
83
|
-
protected constructor(cradle: Record<string, unknown>,
|
|
84
|
-
/**
|
|
85
|
-
* @ignore
|
|
86
|
-
*/
|
|
87
|
-
config?: TConfig);
|
|
88
|
-
/**
|
|
89
|
-
* @ignore
|
|
90
|
-
*/
|
|
91
|
-
static _isPaymentProvider: boolean;
|
|
92
|
-
/**
|
|
93
|
-
* @ignore
|
|
94
|
-
*/
|
|
95
|
-
static isPaymentProvider(object: any): boolean;
|
|
96
|
-
/**
|
|
97
|
-
* Each payment provider has a unique identifier defined in its class. The provider's ID
|
|
98
|
-
* will be stored as `pp_{identifier}_{id}`, where `{id}` is the provider's `id`
|
|
99
|
-
* property in the `acmekit-config.ts`.
|
|
100
|
-
*
|
|
101
|
-
* @example
|
|
102
|
-
* class MyPaymentProviderService extends AbstractPaymentProvider<
|
|
103
|
-
* Options
|
|
104
|
-
* > {
|
|
105
|
-
* static identifier = "my-payment"
|
|
106
|
-
* // ...
|
|
107
|
-
* }
|
|
108
|
-
*/
|
|
109
|
-
static identifier: string;
|
|
110
|
-
/**
|
|
111
|
-
* @ignore
|
|
112
|
-
*
|
|
113
|
-
* Return a unique identifier to retrieve the payment plugin provider
|
|
114
|
-
*/
|
|
115
|
-
getIdentifier(): string;
|
|
116
|
-
/**
|
|
117
|
-
* This method captures a payment using the third-party provider. In this method, use the third-party provider to capture the payment.
|
|
118
|
-
*
|
|
119
|
-
* When an order is placed, the payment is authorized using the {@link authorizePayment} method. Then, the admin
|
|
120
|
-
* user can capture the payment, which triggers this method.
|
|
121
|
-
*
|
|
122
|
-
* 
|
|
123
|
-
*
|
|
124
|
-
* This method can also be triggered by a webhook event if the {@link getWebhookActionAndData} method returns the action `captured`.
|
|
125
|
-
*
|
|
126
|
-
* #### Understanding `data` property
|
|
127
|
-
*
|
|
128
|
-
* The `data` property of the input parameter contains data that was previously stored in the Payment record's `data` property, which was
|
|
129
|
-
* returned by the {@link authorizePayment} method.
|
|
130
|
-
*
|
|
131
|
-
* The `data` property returned by this method is then stored in the `Payment` record. You can store data relevant to later refund or process the payment.
|
|
132
|
-
* For example, you can store the ID of the payment in the third-party provider to reference it later.
|
|
133
|
-
*
|
|
134
|
-
* 
|
|
135
|
-
*
|
|
136
|
-
* @param input - The input to capture the payment. The `data` field should contain the data from the payment provider. when the payment was created.
|
|
137
|
-
* @returns The new data to store in the payment's `data` property. Throws in case of an error.
|
|
138
|
-
*
|
|
139
|
-
* @example
|
|
140
|
-
* // other imports...
|
|
141
|
-
* import {
|
|
142
|
-
* CapturePaymentInput,
|
|
143
|
-
* CapturePaymentOutput,
|
|
144
|
-
* } from "@acmekit/framework/types"
|
|
145
|
-
*
|
|
146
|
-
* class MyPaymentProviderService extends AbstractPaymentProvider<
|
|
147
|
-
* Options
|
|
148
|
-
* > {
|
|
149
|
-
* async capturePayment(
|
|
150
|
-
* input: CapturePaymentInput
|
|
151
|
-
* ): Promise<CapturePaymentOutput> {
|
|
152
|
-
* const externalId = input.data?.id
|
|
153
|
-
*
|
|
154
|
-
* // assuming you have a client that captures the payment
|
|
155
|
-
* const newData = await this.client.capturePayment(externalId)
|
|
156
|
-
* return {
|
|
157
|
-
* data: {
|
|
158
|
-
* ...newData,
|
|
159
|
-
* id: externalId,
|
|
160
|
-
* }
|
|
161
|
-
* }
|
|
162
|
-
* }
|
|
163
|
-
* // ...
|
|
164
|
-
* }
|
|
165
|
-
*/
|
|
166
|
-
abstract capturePayment(input: CapturePaymentInput): Promise<CapturePaymentOutput>;
|
|
167
|
-
/**
|
|
168
|
-
* This method authorizes a payment session using the third-party payment provider.
|
|
169
|
-
*
|
|
170
|
-
* During checkout, the customer may need to perform actions required by the payment provider,
|
|
171
|
-
* such as entering their card details or confirming the payment. Once that is done,
|
|
172
|
-
* the customer can place their order.
|
|
173
|
-
*
|
|
174
|
-
* During cart-completion before placing the order, this method is used to authorize the cart's payment session with the
|
|
175
|
-
* third-party payment provider. The payment can later be captured
|
|
176
|
-
* using the {@link capturePayment} method.
|
|
177
|
-
*
|
|
178
|
-
* 
|
|
179
|
-
*
|
|
180
|
-
* When authorized successfully, a `Payment` is created by the Payment
|
|
181
|
-
* Module, and it's associated with the order.
|
|
182
|
-
*
|
|
183
|
-
* #### Understanding `data` property
|
|
184
|
-
*
|
|
185
|
-
* The `data` property of the method's parameter contains the `PaymentSession` record's `data` property, which was
|
|
186
|
-
* returned by the {@link initiatePayment} method.
|
|
187
|
-
*
|
|
188
|
-
* The `data` property returned by this method is then stored in the created `Payment` record. You can store data relevant to later capture or process the payment.
|
|
189
|
-
* For example, you can store the ID of the payment in the third-party provider to reference it later.
|
|
190
|
-
*
|
|
191
|
-
* 
|
|
192
|
-
*
|
|
193
|
-
* @param input - The input to authorize the payment. The `data` field should contain the data from the payment provider. when the payment was created.
|
|
194
|
-
* @returns The status of the authorization, along with the `data` field about the payment. Throws in case of an error.
|
|
195
|
-
*
|
|
196
|
-
* @example
|
|
197
|
-
* // other imports...
|
|
198
|
-
* import {
|
|
199
|
-
* AuthorizePaymentInput,
|
|
200
|
-
* AuthorizePaymentOutput,
|
|
201
|
-
* PaymentSessionStatus
|
|
202
|
-
* } from "@acmekit/framework/types"
|
|
203
|
-
*
|
|
204
|
-
*
|
|
205
|
-
* class MyPaymentProviderService extends AbstractPaymentProvider<
|
|
206
|
-
* Options
|
|
207
|
-
* > {
|
|
208
|
-
* async authorizePayment(
|
|
209
|
-
* input: AuthorizePaymentInput
|
|
210
|
-
* ): Promise<AuthorizePaymentOutput> {
|
|
211
|
-
* const externalId = input.data?.id
|
|
212
|
-
*
|
|
213
|
-
* // assuming you have a client that authorizes the payment
|
|
214
|
-
* const paymentData = await this.client.authorizePayment(externalId)
|
|
215
|
-
*
|
|
216
|
-
* return {
|
|
217
|
-
* data: paymentData,
|
|
218
|
-
* status: "authorized"
|
|
219
|
-
* }
|
|
220
|
-
* }
|
|
221
|
-
*
|
|
222
|
-
* // ...
|
|
223
|
-
* }
|
|
224
|
-
*/
|
|
225
|
-
abstract authorizePayment(input: AuthorizePaymentInput): Promise<AuthorizePaymentOutput>;
|
|
226
|
-
/**
|
|
227
|
-
* This method cancels a payment in the third-party payment provider. It's used when
|
|
228
|
-
* the admin user cancels an order. The order can only be canceled if the payment
|
|
229
|
-
* is not captured yet.
|
|
230
|
-
*
|
|
231
|
-
* #### Understanding `data` property
|
|
232
|
-
*
|
|
233
|
-
* The `data` property of the method's parameter contains the `Payment` record's `data` property, which was
|
|
234
|
-
* returned by the {@link authorizePayment} method.
|
|
235
|
-
*
|
|
236
|
-
* The `data` property returned by this method is then stored in the `Payment` record. You can store data relevant for any further processing of the payment.
|
|
237
|
-
*
|
|
238
|
-
* 
|
|
239
|
-
*
|
|
240
|
-
* @param input - The input to cancel the payment. The `data` field should contain the data from the payment provider. when the payment was created.
|
|
241
|
-
* @returns The new data to store in the payment's `data` property, if any. Throws in case of an error.
|
|
242
|
-
*
|
|
243
|
-
* @example
|
|
244
|
-
* // other imports...
|
|
245
|
-
* import {
|
|
246
|
-
* PaymentProviderError,
|
|
247
|
-
* PaymentProviderSessionResponse,
|
|
248
|
-
* } from "@acmekit/framework/types"
|
|
249
|
-
*
|
|
250
|
-
*
|
|
251
|
-
* class MyPaymentProviderService extends AbstractPaymentProvider<
|
|
252
|
-
* Options
|
|
253
|
-
* > {
|
|
254
|
-
* async cancelPayment(
|
|
255
|
-
* input: CancelPaymentInput
|
|
256
|
-
* ): Promise<CancelPaymentOutput> {
|
|
257
|
-
* const externalId = input.data?.id
|
|
258
|
-
*
|
|
259
|
-
* // assuming you have a client that cancels the payment
|
|
260
|
-
* const paymentData = await this.client.cancelPayment(externalId)
|
|
261
|
-
* return { data: paymentData }
|
|
262
|
-
* }
|
|
263
|
-
*
|
|
264
|
-
* // ...
|
|
265
|
-
* }
|
|
266
|
-
*/
|
|
267
|
-
abstract cancelPayment(input: CancelPaymentInput): Promise<CancelPaymentOutput>;
|
|
268
|
-
/**
|
|
269
|
-
* This method initializes a payment session with the third-party payment provider.
|
|
270
|
-
*
|
|
271
|
-
* When a customer chooses a payment method during checkout, this method is triggered to
|
|
272
|
-
* perform any initialization action with the third-party provider, such as creating a payment session.
|
|
273
|
-
*
|
|
274
|
-
* 
|
|
275
|
-
*
|
|
276
|
-
* #### Understanding `data` property
|
|
277
|
-
*
|
|
278
|
-
* The `data` property returned by this method will be stored in the created `PaymentSession` record. You can store data relevant to later authorize or process the payment.
|
|
279
|
-
* For example, you can store the ID of the payment session in the third-party provider to reference it later.
|
|
280
|
-
*
|
|
281
|
-
* The `data` property is also available to storefronts, allowing you to store data necessary for the storefront to integrate
|
|
282
|
-
* the payment provider in the checkout flow. For example, you can store the client token to use with the payment provider's SDK.
|
|
283
|
-
*
|
|
284
|
-
* :::note
|
|
285
|
-
*
|
|
286
|
-
* This also means you shouldn't store sensitive data and tokens in the `data` property, as it's publicly accessible.
|
|
287
|
-
*
|
|
288
|
-
* :::
|
|
289
|
-
*
|
|
290
|
-
* 
|
|
291
|
-
*
|
|
292
|
-
* @param input - The input to create the payment session.
|
|
293
|
-
* @returns The new data to store in the payment's `data` property. Throws in case of an error.
|
|
294
|
-
*
|
|
295
|
-
* @example
|
|
296
|
-
* // other imports...
|
|
297
|
-
* import {
|
|
298
|
-
* InitiatePaymentInput,
|
|
299
|
-
* InitiatePaymentOutput,
|
|
300
|
-
* } from "@acmekit/framework/types"
|
|
301
|
-
*
|
|
302
|
-
*
|
|
303
|
-
* class MyPaymentProviderService extends AbstractPaymentProvider<
|
|
304
|
-
* Options
|
|
305
|
-
* > {
|
|
306
|
-
* async initiatePayment(
|
|
307
|
-
* input: InitiatePaymentInput
|
|
308
|
-
* ): Promise<InitiatePaymentOutput> {
|
|
309
|
-
* const {
|
|
310
|
-
* amount,
|
|
311
|
-
* currency_code,
|
|
312
|
-
* context: customerDetails
|
|
313
|
-
* } = input
|
|
314
|
-
*
|
|
315
|
-
* // assuming you have a client that initializes the payment
|
|
316
|
-
* const response = await this.client.init(
|
|
317
|
-
* amount, currency_code, customerDetails
|
|
318
|
-
* )
|
|
319
|
-
*
|
|
320
|
-
* return {
|
|
321
|
-
* id: response.id,
|
|
322
|
-
* data: response,
|
|
323
|
-
* }
|
|
324
|
-
* }
|
|
325
|
-
*
|
|
326
|
-
* // ...
|
|
327
|
-
* }
|
|
328
|
-
*/
|
|
329
|
-
abstract initiatePayment(input: InitiatePaymentInput): Promise<InitiatePaymentOutput>;
|
|
330
|
-
/**
|
|
331
|
-
* This method deletes a payment session in the third-party payment provider.
|
|
332
|
-
*
|
|
333
|
-
* When a customer chooses a payment method during checkout, then chooses a different one,
|
|
334
|
-
* this method is triggered to delete the previous payment session.
|
|
335
|
-
*
|
|
336
|
-
* If your provider doesn't support deleting a payment session, you can just return an empty object or
|
|
337
|
-
* an object that contains the same received `data` property.
|
|
338
|
-
*
|
|
339
|
-
* 
|
|
340
|
-
*
|
|
341
|
-
* #### Understanding `data` property
|
|
342
|
-
*
|
|
343
|
-
* The `data` property of the method's parameter contains the `PaymentSession` record's `data` property, which was
|
|
344
|
-
* returned by the {@link initiatePayment} method.
|
|
345
|
-
*
|
|
346
|
-
* 
|
|
347
|
-
*
|
|
348
|
-
* @param input - The input to delete the payment session. The `data` field should contain the data from the payment provider. when the payment was created.
|
|
349
|
-
* @returns The new data to store in the payment's `data` property, if any. Throws in case of an error.
|
|
350
|
-
*
|
|
351
|
-
* @example
|
|
352
|
-
* // other imports...
|
|
353
|
-
* import {
|
|
354
|
-
* DeletePaymentInput,
|
|
355
|
-
* DeletePaymentOutput,
|
|
356
|
-
* } from "@acmekit/framework/types"
|
|
357
|
-
*
|
|
358
|
-
*
|
|
359
|
-
* class MyPaymentProviderService extends AbstractPaymentProvider<
|
|
360
|
-
* Options
|
|
361
|
-
* > {
|
|
362
|
-
* async deletePayment(
|
|
363
|
-
* input: DeletePaymentInput
|
|
364
|
-
* ): Promise<DeletePaymentOutput> {
|
|
365
|
-
* const externalId = input.data?.id
|
|
366
|
-
*
|
|
367
|
-
* // assuming you have a client that cancels the payment
|
|
368
|
-
* await this.client.cancelPayment(externalId)
|
|
369
|
-
* return {
|
|
370
|
-
* data: input.data
|
|
371
|
-
* }
|
|
372
|
-
* }
|
|
373
|
-
*
|
|
374
|
-
* // ...
|
|
375
|
-
* }
|
|
376
|
-
*/
|
|
377
|
-
abstract deletePayment(input: DeletePaymentInput): Promise<DeletePaymentOutput>;
|
|
378
|
-
/**
|
|
379
|
-
* This method gets the status of a payment session based on the status in the third-party integration.
|
|
380
|
-
*
|
|
381
|
-
* @param input - The input to get the payment status. The `data` field should contain the data from the payment provider. when the payment was created.
|
|
382
|
-
* @returns The payment session's status. It can also return additional `data` from the payment provider.
|
|
383
|
-
*
|
|
384
|
-
* @example
|
|
385
|
-
* // other imports...
|
|
386
|
-
* import {
|
|
387
|
-
* GetPaymentStatusInput,
|
|
388
|
-
* GetPaymentStatusOutput,
|
|
389
|
-
* PaymentSessionStatus
|
|
390
|
-
* } from "@acmekit/framework/types"
|
|
391
|
-
*
|
|
392
|
-
*
|
|
393
|
-
* class MyPaymentProviderService extends AbstractPaymentProvider<
|
|
394
|
-
* Options
|
|
395
|
-
* > {
|
|
396
|
-
* async getPaymentStatus(
|
|
397
|
-
* input: GetPaymentStatusInput
|
|
398
|
-
* ): Promise<GetPaymentStatusOutput> {
|
|
399
|
-
* const externalId = input.data?.id
|
|
400
|
-
*
|
|
401
|
-
* // assuming you have a client that retrieves the payment status
|
|
402
|
-
* const status = await this.client.getStatus(externalId)
|
|
403
|
-
*
|
|
404
|
-
* switch (status) {
|
|
405
|
-
* case "requires_capture":
|
|
406
|
-
* return {status: "authorized"}
|
|
407
|
-
* case "success":
|
|
408
|
-
* return {status: "captured"}
|
|
409
|
-
* case "canceled":
|
|
410
|
-
* return {status: "canceled"}
|
|
411
|
-
* default:
|
|
412
|
-
* return {status: "pending"}
|
|
413
|
-
* }
|
|
414
|
-
* }
|
|
415
|
-
*
|
|
416
|
-
* // ...
|
|
417
|
-
* }
|
|
418
|
-
*/
|
|
419
|
-
abstract getPaymentStatus(input: GetPaymentStatusInput): Promise<GetPaymentStatusOutput>;
|
|
420
|
-
/**
|
|
421
|
-
* This method refunds an amount using the third-party payment provider. This method
|
|
422
|
-
* is triggered when the admin user refunds a payment of an order.
|
|
423
|
-
*
|
|
424
|
-
* #### Understanding `data` property
|
|
425
|
-
*
|
|
426
|
-
* The `data` property of the method's parameter contains the `Payment` record's `data` property, which was
|
|
427
|
-
* returned by the {@link capturePayment} or {@link refundPayment} method.
|
|
428
|
-
*
|
|
429
|
-
* The `data` property returned by this method is then stored in the `Payment` record. You can store data relevant to later refund or process the payment.
|
|
430
|
-
* For example, you can store the ID of the payment in the third-party provider to reference it later.
|
|
431
|
-
*
|
|
432
|
-
* :::note
|
|
433
|
-
*
|
|
434
|
-
* A payment may be refunded multiple times with different amounts. In this case, the `data` property
|
|
435
|
-
* of the input parameter contains the data from the last refund.
|
|
436
|
-
*
|
|
437
|
-
* :::
|
|
438
|
-
*
|
|
439
|
-
* 
|
|
440
|
-
*
|
|
441
|
-
* @param input - The input to refund the payment. The `data` field should contain the data from the payment provider. when the payment was created.
|
|
442
|
-
* @returns The new data to store in the payment's `data` property, or an error object.
|
|
443
|
-
*
|
|
444
|
-
* @example
|
|
445
|
-
* // other imports...
|
|
446
|
-
* import {
|
|
447
|
-
* RefundPaymentInput,
|
|
448
|
-
* RefundPaymentOutput,
|
|
449
|
-
* } from "@acmekit/framework/types"
|
|
450
|
-
*
|
|
451
|
-
*
|
|
452
|
-
* class MyPaymentProviderService extends AbstractPaymentProvider<
|
|
453
|
-
* Options
|
|
454
|
-
* > {
|
|
455
|
-
* async refundPayment(
|
|
456
|
-
* input: RefundPaymentInput
|
|
457
|
-
* ): Promise<RefundPaymentOutput> {
|
|
458
|
-
* const externalId = input.data?.id
|
|
459
|
-
*
|
|
460
|
-
* // assuming you have a client that refunds the payment
|
|
461
|
-
* const newData = await this.client.refund(
|
|
462
|
-
* externalId,
|
|
463
|
-
* input.amount
|
|
464
|
-
* )
|
|
465
|
-
*
|
|
466
|
-
* return {
|
|
467
|
-
* data: input.data,
|
|
468
|
-
* }
|
|
469
|
-
* }
|
|
470
|
-
* // ...
|
|
471
|
-
* }
|
|
472
|
-
*/
|
|
473
|
-
abstract refundPayment(input: RefundPaymentInput): Promise<RefundPaymentOutput>;
|
|
474
|
-
/**
|
|
475
|
-
* This method retrieves the payment's data from the third-party payment provider.
|
|
476
|
-
*
|
|
477
|
-
* @param input - The input to retrieve the payment. The `data` field should contain the data from the payment provider when the payment was created.
|
|
478
|
-
* @returns The payment's data as found in the payment provider.
|
|
479
|
-
*
|
|
480
|
-
* @example
|
|
481
|
-
* // other imports...
|
|
482
|
-
* import {
|
|
483
|
-
* RetrievePaymentInput,
|
|
484
|
-
* RetrievePaymentOutput,
|
|
485
|
-
* } from "@acmekit/framework/types"
|
|
486
|
-
*
|
|
487
|
-
*
|
|
488
|
-
* class MyPaymentProviderService extends AbstractPaymentProvider<
|
|
489
|
-
* Options
|
|
490
|
-
* > {
|
|
491
|
-
* async retrievePayment(
|
|
492
|
-
* input: RetrievePaymentInput
|
|
493
|
-
* ): Promise<RetrievePaymentOutput> {
|
|
494
|
-
* const externalId = input.data?.id
|
|
495
|
-
*
|
|
496
|
-
* // assuming you have a client that retrieves the payment
|
|
497
|
-
* return await this.client.retrieve(externalId)
|
|
498
|
-
* }
|
|
499
|
-
* // ...
|
|
500
|
-
* }
|
|
501
|
-
*/
|
|
502
|
-
abstract retrievePayment(input: RetrievePaymentInput): Promise<RetrievePaymentOutput>;
|
|
503
|
-
/**
|
|
504
|
-
* This method updates a payment in the third-party service that was previously initiated with the {@link initiatePayment} method.
|
|
505
|
-
*
|
|
506
|
-
* @param input - The input to update the payment. The `data` field should contain the data from the payment provider. when the payment was created.
|
|
507
|
-
* @returns The new data to store in the payment's `data` property. Throws in case of an error.
|
|
508
|
-
*
|
|
509
|
-
* @example
|
|
510
|
-
* // other imports...
|
|
511
|
-
* import {
|
|
512
|
-
* UpdatePaymentInput,
|
|
513
|
-
* UpdatePaymentOutput,
|
|
514
|
-
* } from "@acmekit/framework/types"
|
|
515
|
-
*
|
|
516
|
-
*
|
|
517
|
-
* class MyPaymentProviderService extends AbstractPaymentProvider<
|
|
518
|
-
* Options
|
|
519
|
-
* > {
|
|
520
|
-
* async updatePayment(
|
|
521
|
-
* input: UpdatePaymentInput
|
|
522
|
-
* ): Promise<UpdatePaymentOutput> {
|
|
523
|
-
* const { amount, currency_code, context } = input
|
|
524
|
-
* const externalId = input.data?.id
|
|
525
|
-
*
|
|
526
|
-
* // Validate context.customer
|
|
527
|
-
* if (!context || !context.customer) {
|
|
528
|
-
* throw new Error("Context must include a valid customer.");
|
|
529
|
-
* }
|
|
530
|
-
*
|
|
531
|
-
* // assuming you have a client that updates the payment
|
|
532
|
-
* const response = await this.client.update(
|
|
533
|
-
* externalId,
|
|
534
|
-
* {
|
|
535
|
-
* amount,
|
|
536
|
-
* currency_code,
|
|
537
|
-
* customer: context.customer
|
|
538
|
-
* }
|
|
539
|
-
* )
|
|
540
|
-
*
|
|
541
|
-
* return response
|
|
542
|
-
* }
|
|
543
|
-
*
|
|
544
|
-
* // ...
|
|
545
|
-
* }
|
|
546
|
-
*/
|
|
547
|
-
abstract updatePayment(input: UpdatePaymentInput): Promise<UpdatePaymentOutput>;
|
|
548
|
-
/**
|
|
549
|
-
* This method is executed when a webhook event is received from the third-party payment provider. AcmeKit uses
|
|
550
|
-
* the data returned by this method to perform actions in the AcmeKit application, such as completing the associated cart
|
|
551
|
-
* if the payment was authorized successfully.
|
|
552
|
-
*
|
|
553
|
-
* Learn more in the [Webhook Events](https://docs.acmekit.com/resources/commerce-modules/payment/webhook-events) documentation.
|
|
554
|
-
*
|
|
555
|
-
* @param data - The webhook event's data
|
|
556
|
-
* @returns The webhook result. If the `action`'s value is `captured`, the payment is captured within AcmeKit as well.
|
|
557
|
-
* If the `action`'s value is `authorized`, the associated payment session is authorized within AcmeKit and the associated cart
|
|
558
|
-
* will be completed to create an order.
|
|
559
|
-
*
|
|
560
|
-
* @example
|
|
561
|
-
* // other imports...
|
|
562
|
-
* import {
|
|
563
|
-
* BigNumber
|
|
564
|
-
* } from "@acmekit/framework/utils"
|
|
565
|
-
* import {
|
|
566
|
-
* ProviderWebhookPayload,
|
|
567
|
-
* WebhookActionResult
|
|
568
|
-
* } from "@acmekit/framework/types"
|
|
569
|
-
*
|
|
570
|
-
*
|
|
571
|
-
* class MyPaymentProviderService extends AbstractPaymentProvider<
|
|
572
|
-
* Options
|
|
573
|
-
* > {
|
|
574
|
-
* async getWebhookActionAndData(
|
|
575
|
-
* payload: ProviderWebhookPayload["payload"]
|
|
576
|
-
* ): Promise<WebhookActionResult> {
|
|
577
|
-
* const {
|
|
578
|
-
* data,
|
|
579
|
-
* rawData,
|
|
580
|
-
* headers
|
|
581
|
-
* } = payload
|
|
582
|
-
*
|
|
583
|
-
* try {
|
|
584
|
-
* switch(data.event_type) {
|
|
585
|
-
* case "authorized_amount":
|
|
586
|
-
* return {
|
|
587
|
-
* action: "authorized",
|
|
588
|
-
* data: {
|
|
589
|
-
* // assuming the session_id is stored in the metadata of the payment
|
|
590
|
-
* // in the third-party provider
|
|
591
|
-
* session_id: (data.metadata as Record<string, any>).session_id,
|
|
592
|
-
* amount: new BigNumber(data.amount as number)
|
|
593
|
-
* }
|
|
594
|
-
* }
|
|
595
|
-
* case "success":
|
|
596
|
-
* return {
|
|
597
|
-
* action: "captured",
|
|
598
|
-
* data: {
|
|
599
|
-
* // assuming the session_id is stored in the metadata of the payment
|
|
600
|
-
* // in the third-party provider
|
|
601
|
-
* session_id: (data.metadata as Record<string, any>).session_id,
|
|
602
|
-
* amount: new BigNumber(data.amount as number)
|
|
603
|
-
* }
|
|
604
|
-
* }
|
|
605
|
-
* default:
|
|
606
|
-
* return {
|
|
607
|
-
* action: "not_supported",
|
|
608
|
-
* data: {
|
|
609
|
-
* session_id: "",
|
|
610
|
-
* amount: new BigNumber(0)
|
|
611
|
-
* }
|
|
612
|
-
* }
|
|
613
|
-
* }
|
|
614
|
-
* } catch (e) {
|
|
615
|
-
* return {
|
|
616
|
-
* action: "failed",
|
|
617
|
-
* data: {
|
|
618
|
-
* // assuming the session_id is stored in the metadata of the payment
|
|
619
|
-
* // in the third-party provider
|
|
620
|
-
* session_id: (data.metadata as Record<string, any>).session_id,
|
|
621
|
-
* amount: new BigNumber(data.amount as number)
|
|
622
|
-
* }
|
|
623
|
-
* }
|
|
624
|
-
* }
|
|
625
|
-
* }
|
|
626
|
-
*
|
|
627
|
-
* // ...
|
|
628
|
-
* }
|
|
629
|
-
*/
|
|
630
|
-
abstract getWebhookActionAndData(data: ProviderWebhookPayload["payload"]): Promise<WebhookActionResult>;
|
|
631
|
-
}
|
|
632
|
-
//# sourceMappingURL=abstract-payment-provider.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"abstract-payment-provider.d.ts","sourceRoot":"","sources":["../../src/payment/abstract-payment-provider.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,sBAAsB,EACtB,mBAAmB,EACnB,mBAAmB,EACnB,oBAAoB,EACpB,qBAAqB,EACrB,sBAAsB,EACtB,kBAAkB,EAClB,mBAAmB,EACnB,oBAAoB,EACpB,qBAAq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