@wix/auto_sdk_payments_psp-callbacks 1.0.8 → 1.0.10
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/build/cjs/index.d.ts +1 -0
- package/build/cjs/index.js +18 -0
- package/build/cjs/index.js.map +1 -0
- package/build/cjs/index.typings.d.ts +1 -0
- package/build/cjs/index.typings.js +18 -0
- package/build/cjs/index.typings.js.map +1 -0
- package/build/cjs/meta.d.ts +1 -0
- package/build/cjs/meta.js +18 -0
- package/build/cjs/meta.js.map +1 -0
- package/build/cjs/src/payments-psp-v1-provider-platform-event-psp-callbacks.context.d.ts +4 -0
- package/build/cjs/src/payments-psp-v1-provider-platform-event-psp-callbacks.context.js +7 -0
- package/build/cjs/src/payments-psp-v1-provider-platform-event-psp-callbacks.context.js.map +1 -0
- package/build/cjs/src/payments-psp-v1-provider-platform-event-psp-callbacks.http.d.ts +12 -0
- package/build/cjs/src/payments-psp-v1-provider-platform-event-psp-callbacks.http.js +350 -0
- package/build/cjs/src/payments-psp-v1-provider-platform-event-psp-callbacks.http.js.map +1 -0
- package/build/cjs/src/payments-psp-v1-provider-platform-event-psp-callbacks.meta.d.ts +13 -0
- package/build/cjs/src/payments-psp-v1-provider-platform-event-psp-callbacks.meta.js +47 -0
- package/build/cjs/src/payments-psp-v1-provider-platform-event-psp-callbacks.meta.js.map +1 -0
- package/build/cjs/src/payments-psp-v1-provider-platform-event-psp-callbacks.public.d.ts +22 -0
- package/build/cjs/src/payments-psp-v1-provider-platform-event-psp-callbacks.public.js +12 -0
- package/build/cjs/src/payments-psp-v1-provider-platform-event-psp-callbacks.public.js.map +1 -0
- package/build/{internal/payments-psp-v1-provider-platform-event-psp-callbacks.universal-CEQHoEoO.d.mts → cjs/src/payments-psp-v1-provider-platform-event-psp-callbacks.types.d.ts} +13 -15
- package/build/cjs/src/payments-psp-v1-provider-platform-event-psp-callbacks.types.js +3 -0
- package/build/cjs/src/payments-psp-v1-provider-platform-event-psp-callbacks.types.js.map +1 -0
- package/build/{internal/meta.d.mts → cjs/src/payments-psp-v1-provider-platform-event-psp-callbacks.universal.d.ts} +30 -29
- package/build/cjs/src/payments-psp-v1-provider-platform-event-psp-callbacks.universal.js +67 -0
- package/build/cjs/src/payments-psp-v1-provider-platform-event-psp-callbacks.universal.js.map +1 -0
- package/build/es/index.d.ts +1 -0
- package/build/es/index.js +2 -0
- package/build/es/index.js.map +1 -0
- package/build/es/index.typings.d.ts +1 -0
- package/build/es/index.typings.js +2 -0
- package/build/es/index.typings.js.map +1 -0
- package/build/es/meta.d.ts +1 -0
- package/build/es/meta.js +2 -0
- package/build/es/meta.js.map +1 -0
- package/build/es/src/payments-psp-v1-provider-platform-event-psp-callbacks.context.d.ts +4 -0
- package/build/es/src/payments-psp-v1-provider-platform-event-psp-callbacks.context.js +4 -0
- package/build/es/src/payments-psp-v1-provider-platform-event-psp-callbacks.context.js.map +1 -0
- package/build/es/src/payments-psp-v1-provider-platform-event-psp-callbacks.http.d.ts +12 -0
- package/build/es/src/payments-psp-v1-provider-platform-event-psp-callbacks.http.js +346 -0
- package/build/es/src/payments-psp-v1-provider-platform-event-psp-callbacks.http.js.map +1 -0
- package/build/es/src/payments-psp-v1-provider-platform-event-psp-callbacks.meta.d.ts +13 -0
- package/build/es/src/payments-psp-v1-provider-platform-event-psp-callbacks.meta.js +20 -0
- package/build/es/src/payments-psp-v1-provider-platform-event-psp-callbacks.meta.js.map +1 -0
- package/build/es/src/payments-psp-v1-provider-platform-event-psp-callbacks.public.d.ts +22 -0
- package/build/es/src/payments-psp-v1-provider-platform-event-psp-callbacks.public.js +8 -0
- package/build/es/src/payments-psp-v1-provider-platform-event-psp-callbacks.public.js.map +1 -0
- package/build/{internal/payments-psp-v1-provider-platform-event-psp-callbacks.universal-CEQHoEoO.d.ts → es/src/payments-psp-v1-provider-platform-event-psp-callbacks.types.d.ts} +13 -15
- package/build/es/src/payments-psp-v1-provider-platform-event-psp-callbacks.types.js +2 -0
- package/build/es/src/payments-psp-v1-provider-platform-event-psp-callbacks.types.js.map +1 -0
- package/build/{internal/meta.d.ts → es/src/payments-psp-v1-provider-platform-event-psp-callbacks.universal.d.ts} +30 -29
- package/build/es/src/payments-psp-v1-provider-platform-event-psp-callbacks.universal.js +40 -0
- package/build/es/src/payments-psp-v1-provider-platform-event-psp-callbacks.universal.js.map +1 -0
- package/build/internal/cjs/index.d.ts +1 -0
- package/build/internal/cjs/index.js +18 -0
- package/build/internal/cjs/index.js.map +1 -0
- package/build/internal/cjs/index.typings.d.ts +1 -0
- package/build/internal/cjs/index.typings.js +18 -0
- package/build/internal/cjs/index.typings.js.map +1 -0
- package/build/internal/cjs/meta.d.ts +1 -0
- package/build/internal/cjs/meta.js +18 -0
- package/build/internal/cjs/meta.js.map +1 -0
- package/build/internal/cjs/src/payments-psp-v1-provider-platform-event-psp-callbacks.context.d.ts +4 -0
- package/build/internal/cjs/src/payments-psp-v1-provider-platform-event-psp-callbacks.context.js +7 -0
- package/build/internal/cjs/src/payments-psp-v1-provider-platform-event-psp-callbacks.context.js.map +1 -0
- package/build/internal/cjs/src/payments-psp-v1-provider-platform-event-psp-callbacks.http.d.ts +12 -0
- package/build/internal/cjs/src/payments-psp-v1-provider-platform-event-psp-callbacks.http.js +350 -0
- package/build/internal/cjs/src/payments-psp-v1-provider-platform-event-psp-callbacks.http.js.map +1 -0
- package/build/internal/cjs/src/payments-psp-v1-provider-platform-event-psp-callbacks.meta.d.ts +13 -0
- package/build/internal/cjs/src/payments-psp-v1-provider-platform-event-psp-callbacks.meta.js +47 -0
- package/build/internal/cjs/src/payments-psp-v1-provider-platform-event-psp-callbacks.meta.js.map +1 -0
- package/build/internal/cjs/src/payments-psp-v1-provider-platform-event-psp-callbacks.public.d.ts +22 -0
- package/build/internal/cjs/src/payments-psp-v1-provider-platform-event-psp-callbacks.public.js +12 -0
- package/build/internal/cjs/src/payments-psp-v1-provider-platform-event-psp-callbacks.public.js.map +1 -0
- package/build/{payments-psp-v1-provider-platform-event-psp-callbacks.universal-CEQHoEoO.d.mts → internal/cjs/src/payments-psp-v1-provider-platform-event-psp-callbacks.types.d.ts} +13 -15
- package/build/internal/cjs/src/payments-psp-v1-provider-platform-event-psp-callbacks.types.js +3 -0
- package/build/internal/cjs/src/payments-psp-v1-provider-platform-event-psp-callbacks.types.js.map +1 -0
- package/build/internal/cjs/src/payments-psp-v1-provider-platform-event-psp-callbacks.universal.d.ts +169 -0
- package/build/internal/cjs/src/payments-psp-v1-provider-platform-event-psp-callbacks.universal.js +67 -0
- package/build/internal/cjs/src/payments-psp-v1-provider-platform-event-psp-callbacks.universal.js.map +1 -0
- package/build/internal/es/index.d.ts +1 -0
- package/build/internal/es/index.js +2 -0
- package/build/internal/es/index.js.map +1 -0
- package/build/internal/es/index.typings.d.ts +1 -0
- package/build/internal/es/index.typings.js +2 -0
- package/build/internal/es/index.typings.js.map +1 -0
- package/build/internal/es/meta.d.ts +1 -0
- package/build/internal/es/meta.js +2 -0
- package/build/internal/es/meta.js.map +1 -0
- package/build/internal/es/src/payments-psp-v1-provider-platform-event-psp-callbacks.context.d.ts +4 -0
- package/build/internal/es/src/payments-psp-v1-provider-platform-event-psp-callbacks.context.js +4 -0
- package/build/internal/es/src/payments-psp-v1-provider-platform-event-psp-callbacks.context.js.map +1 -0
- package/build/internal/es/src/payments-psp-v1-provider-platform-event-psp-callbacks.http.d.ts +12 -0
- package/build/internal/es/src/payments-psp-v1-provider-platform-event-psp-callbacks.http.js +346 -0
- package/build/internal/es/src/payments-psp-v1-provider-platform-event-psp-callbacks.http.js.map +1 -0
- package/build/internal/es/src/payments-psp-v1-provider-platform-event-psp-callbacks.meta.d.ts +13 -0
- package/build/internal/es/src/payments-psp-v1-provider-platform-event-psp-callbacks.meta.js +20 -0
- package/build/internal/es/src/payments-psp-v1-provider-platform-event-psp-callbacks.meta.js.map +1 -0
- package/build/internal/es/src/payments-psp-v1-provider-platform-event-psp-callbacks.public.d.ts +22 -0
- package/build/internal/es/src/payments-psp-v1-provider-platform-event-psp-callbacks.public.js +8 -0
- package/build/internal/es/src/payments-psp-v1-provider-platform-event-psp-callbacks.public.js.map +1 -0
- package/build/{payments-psp-v1-provider-platform-event-psp-callbacks.universal-CEQHoEoO.d.ts → internal/es/src/payments-psp-v1-provider-platform-event-psp-callbacks.types.d.ts} +13 -15
- package/build/internal/es/src/payments-psp-v1-provider-platform-event-psp-callbacks.types.js +2 -0
- package/build/internal/es/src/payments-psp-v1-provider-platform-event-psp-callbacks.types.js.map +1 -0
- package/build/internal/es/src/payments-psp-v1-provider-platform-event-psp-callbacks.universal.d.ts +169 -0
- package/build/internal/es/src/payments-psp-v1-provider-platform-event-psp-callbacks.universal.js +40 -0
- package/build/internal/es/src/payments-psp-v1-provider-platform-event-psp-callbacks.universal.js.map +1 -0
- package/package.json +11 -12
- package/build/index.d.mts +0 -24
- package/build/index.d.ts +0 -24
- package/build/index.js +0 -410
- package/build/index.js.map +0 -1
- package/build/index.mjs +0 -383
- package/build/index.mjs.map +0 -1
- package/build/internal/index.d.mts +0 -24
- package/build/internal/index.d.ts +0 -24
- package/build/internal/index.js +0 -410
- package/build/internal/index.js.map +0 -1
- package/build/internal/index.mjs +0 -383
- package/build/internal/index.mjs.map +0 -1
- package/build/internal/meta.js +0 -389
- package/build/internal/meta.js.map +0 -1
- package/build/internal/meta.mjs +0 -362
- package/build/internal/meta.mjs.map +0 -1
- package/build/meta.d.mts +0 -168
- package/build/meta.d.ts +0 -168
- package/build/meta.js +0 -389
- package/build/meta.js.map +0 -1
- package/build/meta.mjs +0 -362
- package/build/meta.mjs.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** Provider platform event */
|
|
2
|
-
interface ProviderPlatformEvent extends ProviderPlatformEventResourceOneOf {
|
|
2
|
+
export interface ProviderPlatformEvent extends ProviderPlatformEventResourceOneOf {
|
|
3
3
|
/** Refund event data. */
|
|
4
4
|
refund?: RefundEvent;
|
|
5
5
|
/** Transaction event data. */
|
|
@@ -15,7 +15,7 @@ interface ProviderPlatformEvent extends ProviderPlatformEventResourceOneOf {
|
|
|
15
15
|
pluginId?: string;
|
|
16
16
|
}
|
|
17
17
|
/** @oneof */
|
|
18
|
-
interface ProviderPlatformEventResourceOneOf {
|
|
18
|
+
export interface ProviderPlatformEventResourceOneOf {
|
|
19
19
|
/** Refund event data. */
|
|
20
20
|
refund?: RefundEvent;
|
|
21
21
|
/** Transaction event data. */
|
|
@@ -25,7 +25,7 @@ interface ProviderPlatformEventResourceOneOf {
|
|
|
25
25
|
/** Void event data. */
|
|
26
26
|
void?: VoidEvent;
|
|
27
27
|
}
|
|
28
|
-
interface RefundEvent {
|
|
28
|
+
export interface RefundEvent {
|
|
29
29
|
/** Wix transaction ID. */
|
|
30
30
|
wixTransactionId?: string;
|
|
31
31
|
/** PSP refund ID. */
|
|
@@ -41,7 +41,7 @@ interface RefundEvent {
|
|
|
41
41
|
/** PSP-specific error message. */
|
|
42
42
|
errorMessage?: string | null;
|
|
43
43
|
}
|
|
44
|
-
interface TransactionEvent {
|
|
44
|
+
export interface TransactionEvent {
|
|
45
45
|
/** Wix transaction ID. */
|
|
46
46
|
wixTransactionId?: string;
|
|
47
47
|
/** PSP transaction ID. */
|
|
@@ -57,30 +57,30 @@ interface TransactionEvent {
|
|
|
57
57
|
/** Details of actual customer's card, obtained from a Funding PAN as opposed to a Device PAN. */
|
|
58
58
|
cardDetails?: CardDetails;
|
|
59
59
|
}
|
|
60
|
-
interface CredentialsOnFile extends CredentialsOnFileInfoOneOf {
|
|
60
|
+
export interface CredentialsOnFile extends CredentialsOnFileInfoOneOf {
|
|
61
61
|
/** Network token data. */
|
|
62
62
|
cardReference?: CardReference;
|
|
63
63
|
/** Provider generated token data. */
|
|
64
64
|
paymentMethodReference?: PaymentMethodReference;
|
|
65
65
|
}
|
|
66
66
|
/** @oneof */
|
|
67
|
-
interface CredentialsOnFileInfoOneOf {
|
|
67
|
+
export interface CredentialsOnFileInfoOneOf {
|
|
68
68
|
/** Network token data. */
|
|
69
69
|
cardReference?: CardReference;
|
|
70
70
|
/** Provider generated token data. */
|
|
71
71
|
paymentMethodReference?: PaymentMethodReference;
|
|
72
72
|
}
|
|
73
|
-
interface CardReference {
|
|
73
|
+
export interface CardReference {
|
|
74
74
|
/** Network token. */
|
|
75
75
|
networkTransactionId?: string;
|
|
76
76
|
/** Directory Server transaction ID */
|
|
77
77
|
dsTransactionId?: string | null;
|
|
78
78
|
}
|
|
79
|
-
interface PaymentMethodReference {
|
|
79
|
+
export interface PaymentMethodReference {
|
|
80
80
|
/** Payment method token created by the PSP. */
|
|
81
81
|
token?: string;
|
|
82
82
|
}
|
|
83
|
-
interface CardDetails {
|
|
83
|
+
export interface CardDetails {
|
|
84
84
|
/**
|
|
85
85
|
* Issuer (business) identification number. First 6 or 8 digits of the card's number.
|
|
86
86
|
* @minLength 6
|
|
@@ -94,7 +94,7 @@ interface CardDetails {
|
|
|
94
94
|
*/
|
|
95
95
|
lastFour?: string | null;
|
|
96
96
|
}
|
|
97
|
-
interface CaptureEvent {
|
|
97
|
+
export interface CaptureEvent {
|
|
98
98
|
/**
|
|
99
99
|
* Wix transaction ID.
|
|
100
100
|
* @format GUID
|
|
@@ -118,7 +118,7 @@ interface CaptureEvent {
|
|
|
118
118
|
*/
|
|
119
119
|
errorMessage?: string | null;
|
|
120
120
|
}
|
|
121
|
-
interface VoidEvent {
|
|
121
|
+
export interface VoidEvent {
|
|
122
122
|
/**
|
|
123
123
|
* Wix transaction ID.
|
|
124
124
|
* @format GUID
|
|
@@ -143,12 +143,10 @@ interface VoidEvent {
|
|
|
143
143
|
errorMessage?: string | null;
|
|
144
144
|
}
|
|
145
145
|
/** Submit event request */
|
|
146
|
-
interface SubmitEventRequest {
|
|
146
|
+
export interface SubmitEventRequest {
|
|
147
147
|
/** Event data. */
|
|
148
148
|
event: ProviderPlatformEvent;
|
|
149
149
|
}
|
|
150
150
|
/** Submit event response */
|
|
151
|
-
interface SubmitEventResponse {
|
|
151
|
+
export interface SubmitEventResponse {
|
|
152
152
|
}
|
|
153
|
-
|
|
154
|
-
export type { CredentialsOnFile as C, ProviderPlatformEvent as P, RefundEvent as R, SubmitEventRequest as S, TransactionEvent as T, VoidEvent as V, ProviderPlatformEventResourceOneOf as a, CredentialsOnFileInfoOneOf as b, CardReference as c, PaymentMethodReference as d, CardDetails as e, CaptureEvent as f, SubmitEventResponse as g };
|
package/build/internal/cjs/src/payments-psp-v1-provider-platform-event-psp-callbacks.types.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"payments-psp-v1-provider-platform-event-psp-callbacks.types.js","sourceRoot":"","sources":["../../../../src/payments-psp-v1-provider-platform-event-psp-callbacks.types.ts"],"names":[],"mappings":""}
|
package/build/internal/cjs/src/payments-psp-v1-provider-platform-event-psp-callbacks.universal.d.ts
ADDED
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
/** Provider platform event */
|
|
2
|
+
export interface ProviderPlatformEvent extends ProviderPlatformEventResourceOneOf {
|
|
3
|
+
/** Refund event data. */
|
|
4
|
+
refund?: RefundEvent;
|
|
5
|
+
/** Transaction event data. */
|
|
6
|
+
transaction?: TransactionEvent;
|
|
7
|
+
/** Capture event data. */
|
|
8
|
+
capture?: CaptureEvent;
|
|
9
|
+
/** Void event data. */
|
|
10
|
+
void?: VoidEvent;
|
|
11
|
+
/**
|
|
12
|
+
* This field is deprecated.
|
|
13
|
+
* @deprecated
|
|
14
|
+
*/
|
|
15
|
+
pluginId?: string;
|
|
16
|
+
}
|
|
17
|
+
/** @oneof */
|
|
18
|
+
export interface ProviderPlatformEventResourceOneOf {
|
|
19
|
+
/** Refund event data. */
|
|
20
|
+
refund?: RefundEvent;
|
|
21
|
+
/** Transaction event data. */
|
|
22
|
+
transaction?: TransactionEvent;
|
|
23
|
+
/** Capture event data. */
|
|
24
|
+
capture?: CaptureEvent;
|
|
25
|
+
/** Void event data. */
|
|
26
|
+
void?: VoidEvent;
|
|
27
|
+
}
|
|
28
|
+
export interface RefundEvent {
|
|
29
|
+
/** Wix transaction ID. */
|
|
30
|
+
wixTransactionId?: string;
|
|
31
|
+
/** PSP refund ID. */
|
|
32
|
+
pluginRefundId?: string;
|
|
33
|
+
/** Wix [reason code](https://dev.wix.com/api/rest/all-apis/provider-platform/reason-codes#all-apis_provider-platform_reason-codes_refund-declined) indicating a failed request. */
|
|
34
|
+
reasonCode?: number;
|
|
35
|
+
/** Refunded amount. */
|
|
36
|
+
amount?: string;
|
|
37
|
+
/** Wix refund ID. This field is only required when a merchant initiates a refund from the Wix dashboard. */
|
|
38
|
+
wixRefundId?: string | null;
|
|
39
|
+
/** PSP-specific error code. */
|
|
40
|
+
errorCode?: string | null;
|
|
41
|
+
/** PSP-specific error message. */
|
|
42
|
+
errorMessage?: string | null;
|
|
43
|
+
}
|
|
44
|
+
export interface TransactionEvent {
|
|
45
|
+
/** Wix transaction ID. */
|
|
46
|
+
wixTransactionId?: string;
|
|
47
|
+
/** PSP transaction ID. */
|
|
48
|
+
pluginTransactionId?: string;
|
|
49
|
+
/** Wix [reason code](https://dev.wix.com/api/rest/all-apis/provider-platform/reason-codes) indicating a failed or pending request. */
|
|
50
|
+
reasonCode?: number;
|
|
51
|
+
/** PSP-specific error code. */
|
|
52
|
+
errorCode?: string | null;
|
|
53
|
+
/** PSP-specific error message. */
|
|
54
|
+
errorMessage?: string | null;
|
|
55
|
+
/** Token data for stored payment method. */
|
|
56
|
+
credentialsOnFile?: CredentialsOnFile;
|
|
57
|
+
/** Details of actual customer's card, obtained from a Funding PAN as opposed to a Device PAN. */
|
|
58
|
+
cardDetails?: CardDetails;
|
|
59
|
+
}
|
|
60
|
+
export interface CredentialsOnFile extends CredentialsOnFileInfoOneOf {
|
|
61
|
+
/** Network token data. */
|
|
62
|
+
cardReference?: CardReference;
|
|
63
|
+
/** Provider generated token data. */
|
|
64
|
+
paymentMethodReference?: PaymentMethodReference;
|
|
65
|
+
}
|
|
66
|
+
/** @oneof */
|
|
67
|
+
export interface CredentialsOnFileInfoOneOf {
|
|
68
|
+
/** Network token data. */
|
|
69
|
+
cardReference?: CardReference;
|
|
70
|
+
/** Provider generated token data. */
|
|
71
|
+
paymentMethodReference?: PaymentMethodReference;
|
|
72
|
+
}
|
|
73
|
+
export interface CardReference {
|
|
74
|
+
/** Network token. */
|
|
75
|
+
networkTransactionId?: string;
|
|
76
|
+
/** Directory Server transaction ID */
|
|
77
|
+
dsTransactionId?: string | null;
|
|
78
|
+
}
|
|
79
|
+
export interface PaymentMethodReference {
|
|
80
|
+
/** Payment method token created by the PSP. */
|
|
81
|
+
token?: string;
|
|
82
|
+
}
|
|
83
|
+
export interface CardDetails {
|
|
84
|
+
/**
|
|
85
|
+
* Issuer (business) identification number. First 6 or 8 digits of the card's number.
|
|
86
|
+
* @minLength 6
|
|
87
|
+
* @maxLength 8
|
|
88
|
+
*/
|
|
89
|
+
bin?: string | null;
|
|
90
|
+
/**
|
|
91
|
+
* Last 4 digits of the card's number.
|
|
92
|
+
* @minLength 4
|
|
93
|
+
* @maxLength 4
|
|
94
|
+
*/
|
|
95
|
+
lastFour?: string | null;
|
|
96
|
+
}
|
|
97
|
+
export interface CaptureEvent {
|
|
98
|
+
/**
|
|
99
|
+
* Wix transaction ID.
|
|
100
|
+
* @format GUID
|
|
101
|
+
*/
|
|
102
|
+
wixTransactionId?: string;
|
|
103
|
+
/** Wix [reason code](https://dev.wix.com/docs/rest/business-management/payments/service-plugins/payment-service-provider-service-plugin/reason-codes) indicating request's status. */
|
|
104
|
+
reasonCode?: number;
|
|
105
|
+
/**
|
|
106
|
+
* Total amount captured in a currency’s minor units.
|
|
107
|
+
* Learn more about [currencies](https://dev.wix.com/docs/rest/business-management/payments/service-plugins/payment-service-provider-service-plugin/currencies).
|
|
108
|
+
*/
|
|
109
|
+
amount?: string;
|
|
110
|
+
/**
|
|
111
|
+
* PSP-specific error code.
|
|
112
|
+
* @maxLength 50
|
|
113
|
+
*/
|
|
114
|
+
errorCode?: string | null;
|
|
115
|
+
/**
|
|
116
|
+
* PSP-specific error message.
|
|
117
|
+
* @maxLength 300
|
|
118
|
+
*/
|
|
119
|
+
errorMessage?: string | null;
|
|
120
|
+
}
|
|
121
|
+
export interface VoidEvent {
|
|
122
|
+
/**
|
|
123
|
+
* Wix transaction ID.
|
|
124
|
+
* @format GUID
|
|
125
|
+
*/
|
|
126
|
+
wixTransactionId?: string;
|
|
127
|
+
/** Wix [reason code](https://dev.wix.com/docs/rest/business-management/payments/service-plugins/payment-service-provider-service-plugin/reason-codes) indicating request's status. */
|
|
128
|
+
reasonCode?: number;
|
|
129
|
+
/**
|
|
130
|
+
* Total amount voided in a currency’s minor units.
|
|
131
|
+
* Learn more about [currencies](https://dev.wix.com/docs/rest/business-management/payments/service-plugins/payment-service-provider-service-plugin/currencies).
|
|
132
|
+
*/
|
|
133
|
+
amount?: string;
|
|
134
|
+
/**
|
|
135
|
+
* PSP-specific error code.
|
|
136
|
+
* @maxLength 50
|
|
137
|
+
*/
|
|
138
|
+
errorCode?: string | null;
|
|
139
|
+
/**
|
|
140
|
+
* PSP-specific error message.
|
|
141
|
+
* @maxLength 300
|
|
142
|
+
*/
|
|
143
|
+
errorMessage?: string | null;
|
|
144
|
+
}
|
|
145
|
+
/** Submit event request */
|
|
146
|
+
export interface SubmitEventRequest {
|
|
147
|
+
/** Event data. */
|
|
148
|
+
event: ProviderPlatformEvent;
|
|
149
|
+
}
|
|
150
|
+
/** Submit event response */
|
|
151
|
+
export interface SubmitEventResponse {
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* This Wix API is used by a Payment Service Provider (PSP) to send webhooks about payment and refund states to Wix.
|
|
155
|
+
*
|
|
156
|
+
* Calls to this endpoint must include a `User-Agent` header with the name of the PSP and the integration version in this format: `{PSP}/{version}`.
|
|
157
|
+
* PSP's create their own version numbers.
|
|
158
|
+
*
|
|
159
|
+
* > You cannot try out this endpoint because an `Authorization` header value has to be obtained
|
|
160
|
+
* > with the OAuth 2.0 client credentials flow for a specific scope.
|
|
161
|
+
* > So please ignore the **Authorization** section below as well as the **Try It Out** button.
|
|
162
|
+
* @param event - Event data.
|
|
163
|
+
* @public
|
|
164
|
+
* @requiredField event
|
|
165
|
+
* @permissionId CASHIER.GET_ACCESS
|
|
166
|
+
* @returns Submit event response
|
|
167
|
+
* @fqn wix.payments.v1.provider_platform_events.ProviderPlatformEventsService.SubmitEvent
|
|
168
|
+
*/
|
|
169
|
+
export declare function submitEvent(event: ProviderPlatformEvent): Promise<void>;
|
package/build/internal/cjs/src/payments-psp-v1-provider-platform-event-psp-callbacks.universal.js
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.submitEvent = void 0;
|
|
27
|
+
const transform_error_1 = require("@wix/sdk-runtime/transform-error");
|
|
28
|
+
const rename_all_nested_keys_1 = require("@wix/sdk-runtime/rename-all-nested-keys");
|
|
29
|
+
const ambassadorWixPaymentsPspV1ProviderPlatformEvent = __importStar(require("./payments-psp-v1-provider-platform-event-psp-callbacks.http.js"));
|
|
30
|
+
/**
|
|
31
|
+
* This Wix API is used by a Payment Service Provider (PSP) to send webhooks about payment and refund states to Wix.
|
|
32
|
+
*
|
|
33
|
+
* Calls to this endpoint must include a `User-Agent` header with the name of the PSP and the integration version in this format: `{PSP}/{version}`.
|
|
34
|
+
* PSP's create their own version numbers.
|
|
35
|
+
*
|
|
36
|
+
* > You cannot try out this endpoint because an `Authorization` header value has to be obtained
|
|
37
|
+
* > with the OAuth 2.0 client credentials flow for a specific scope.
|
|
38
|
+
* > So please ignore the **Authorization** section below as well as the **Try It Out** button.
|
|
39
|
+
* @param event - Event data.
|
|
40
|
+
* @public
|
|
41
|
+
* @requiredField event
|
|
42
|
+
* @permissionId CASHIER.GET_ACCESS
|
|
43
|
+
* @returns Submit event response
|
|
44
|
+
* @fqn wix.payments.v1.provider_platform_events.ProviderPlatformEventsService.SubmitEvent
|
|
45
|
+
*/
|
|
46
|
+
async function submitEvent(event) {
|
|
47
|
+
// @ts-ignore
|
|
48
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
49
|
+
const payload = (0, rename_all_nested_keys_1.renameKeysFromSDKRequestToRESTRequest)({ event: event });
|
|
50
|
+
const reqOpts = ambassadorWixPaymentsPspV1ProviderPlatformEvent.submitEvent(payload);
|
|
51
|
+
sideEffects?.onSiteCall?.();
|
|
52
|
+
try {
|
|
53
|
+
const result = await httpClient.request(reqOpts);
|
|
54
|
+
sideEffects?.onSuccess?.(result);
|
|
55
|
+
}
|
|
56
|
+
catch (err) {
|
|
57
|
+
const transformedError = (0, transform_error_1.transformError)(err, {
|
|
58
|
+
spreadPathsToArguments: {},
|
|
59
|
+
explicitPathsToArguments: { event: '$[0]' },
|
|
60
|
+
singleArgumentUnchanged: false,
|
|
61
|
+
}, ['event']);
|
|
62
|
+
sideEffects?.onError?.(err);
|
|
63
|
+
throw transformedError;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
exports.submitEvent = submitEvent;
|
|
67
|
+
//# sourceMappingURL=payments-psp-v1-provider-platform-event-psp-callbacks.universal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"payments-psp-v1-provider-platform-event-psp-callbacks.universal.js","sourceRoot":"","sources":["../../../../src/payments-psp-v1-provider-platform-event-psp-callbacks.universal.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,sEAAuF;AACvF,oFAAgG;AAEhG,iJAAmI;AAuKnI;;;;;;;;;;;;;;;GAeG;AACI,KAAK,UAAU,WAAW,CAAC,KAA4B;IAC5D,aAAa;IACb,MAAM,EAAE,UAAU,EAAE,WAAW,EAAE,GAAG,SAAS,CAAC,CAAC,CAG9C,CAAC;IAEF,MAAM,OAAO,GAAG,IAAA,8DAAqC,EAAC,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC;IAExE,MAAM,OAAO,GACX,+CAA+C,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;IAEvE,WAAW,EAAE,UAAU,EAAE,EAAE,CAAC;IAC5B,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,MAAM,UAAU,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;QACjD,WAAW,EAAE,SAAS,EAAE,CAAC,MAAM,CAAC,CAAC;IACnC,CAAC;IAAC,OAAO,GAAQ,EAAE,CAAC;QAClB,MAAM,gBAAgB,GAAG,IAAA,gCAAiB,EACxC,GAAG,EACH;YACE,sBAAsB,EAAE,EAAE;YAC1B,wBAAwB,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE;YAC3C,uBAAuB,EAAE,KAAK;SAC/B,EACD,CAAC,OAAO,CAAC,CACV,CAAC;QACF,WAAW,EAAE,OAAO,EAAE,CAAC,GAAG,CAAC,CAAC;QAE5B,MAAM,gBAAgB,CAAC;IACzB,CAAC;AACH,CAAC;AA9BD,kCA8BC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './src/payments-psp-v1-provider-platform-event-psp-callbacks.context.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../index.ts"],"names":[],"mappings":"AAAA,cAAc,wEAAwE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './src/payments-psp-v1-provider-platform-event-psp-callbacks.universal.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.typings.js","sourceRoot":"","sources":["../../../index.typings.ts"],"names":[],"mappings":"AAAA,cAAc,0EAA0E,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './src/payments-psp-v1-provider-platform-event-psp-callbacks.meta.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"meta.js","sourceRoot":"","sources":["../../../meta.ts"],"names":[],"mappings":"AAAA,cAAc,qEAAqE,CAAC"}
|
package/build/internal/es/src/payments-psp-v1-provider-platform-event-psp-callbacks.context.d.ts
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { submitEvent as publicSubmitEvent } from './payments-psp-v1-provider-platform-event-psp-callbacks.public.js';
|
|
2
|
+
import { BuildRESTFunction, MaybeContext } from '@wix/sdk-types';
|
|
3
|
+
export declare const submitEvent: MaybeContext<BuildRESTFunction<typeof publicSubmitEvent> & typeof publicSubmitEvent>;
|
|
4
|
+
export { ProviderPlatformEvent, ProviderPlatformEventResourceOneOf, RefundEvent, TransactionEvent, CredentialsOnFile, CredentialsOnFileInfoOneOf, CardReference, PaymentMethodReference, CardDetails, CaptureEvent, VoidEvent, SubmitEventRequest, SubmitEventResponse, } from './payments-psp-v1-provider-platform-event-psp-callbacks.universal.js';
|
package/build/internal/es/src/payments-psp-v1-provider-platform-event-psp-callbacks.context.js
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { submitEvent as publicSubmitEvent } from './payments-psp-v1-provider-platform-event-psp-callbacks.public.js';
|
|
2
|
+
import { createRESTModule } from '@wix/sdk-runtime/rest-modules';
|
|
3
|
+
export const submitEvent = /*#__PURE__*/ createRESTModule(publicSubmitEvent);
|
|
4
|
+
//# sourceMappingURL=payments-psp-v1-provider-platform-event-psp-callbacks.context.js.map
|
package/build/internal/es/src/payments-psp-v1-provider-platform-event-psp-callbacks.context.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"payments-psp-v1-provider-platform-event-psp-callbacks.context.js","sourceRoot":"","sources":["../../../../src/payments-psp-v1-provider-platform-event-psp-callbacks.context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,IAAI,iBAAiB,EAAE,MAAM,mEAAmE,CAAC;AACrH,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAGjE,MAAM,CAAC,MAAM,WAAW,GAEpB,aAAa,CAAC,gBAAgB,CAAC,iBAAiB,CAAC,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { RequestOptionsFactory } from '@wix/sdk-types';
|
|
2
|
+
/**
|
|
3
|
+
* This Wix API is used by a Payment Service Provider (PSP) to send webhooks about payment and refund states to Wix.
|
|
4
|
+
*
|
|
5
|
+
* Calls to this endpoint must include a `User-Agent` header with the name of the PSP and the integration version in this format: `{PSP}/{version}`.
|
|
6
|
+
* PSP's create their own version numbers.
|
|
7
|
+
*
|
|
8
|
+
* > You cannot try out this endpoint because an `Authorization` header value has to be obtained
|
|
9
|
+
* > with the OAuth 2.0 client credentials flow for a specific scope.
|
|
10
|
+
* > So please ignore the **Authorization** section below as well as the **Try It Out** button.
|
|
11
|
+
*/
|
|
12
|
+
export declare function submitEvent(payload: object): RequestOptionsFactory<any>;
|