@wix/auto_sdk_payments_psp-callbacks 1.0.0
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 +340 -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/cjs/src/payments-psp-v1-provider-platform-event-psp-callbacks.types.d.ts +120 -0
- 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/cjs/src/payments-psp-v1-provider-platform-event-psp-callbacks.universal.d.ts +137 -0
- 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/package.json +3 -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 +336 -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/es/src/payments-psp-v1-provider-platform-event-psp-callbacks.types.d.ts +120 -0
- 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/es/src/payments-psp-v1-provider-platform-event-psp-callbacks.universal.d.ts +137 -0
- 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 +340 -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/internal/cjs/src/payments-psp-v1-provider-platform-event-psp-callbacks.types.d.ts +120 -0
- 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 +137 -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 +336 -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/internal/es/src/payments-psp-v1-provider-platform-event-psp-callbacks.types.d.ts +120 -0
- 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 +137 -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/meta/package.json +3 -0
- package/package.json +52 -0
|
@@ -0,0 +1,120 @@
|
|
|
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 ignored, do not send it.
|
|
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
|
+
/** Issuer (business) identification number. First 6 or 8 digits of the card's number. */
|
|
85
|
+
bin?: string | null;
|
|
86
|
+
/** Last 4 digits of the card's number. */
|
|
87
|
+
lastFour?: string | null;
|
|
88
|
+
}
|
|
89
|
+
export interface CaptureEvent {
|
|
90
|
+
/** Wix transaction ID. */
|
|
91
|
+
wixTransactionId?: string;
|
|
92
|
+
/** Wix [reason code](https://dev.wix.com/docs/rest/business-management/payments/service-plugins/payment-service-provider-service-plugin/reason-codes#capture-declined) indicating request's status. */
|
|
93
|
+
reasonCode?: number;
|
|
94
|
+
/** Capture amount. */
|
|
95
|
+
amount?: string;
|
|
96
|
+
/** PSP-specific error code. */
|
|
97
|
+
errorCode?: string | null;
|
|
98
|
+
/** PSP-specific error message. */
|
|
99
|
+
errorMessage?: string | null;
|
|
100
|
+
}
|
|
101
|
+
export interface VoidEvent {
|
|
102
|
+
/** Wix transaction ID. */
|
|
103
|
+
wixTransactionId?: string;
|
|
104
|
+
/** PSP void ID. */
|
|
105
|
+
reasonCode?: number;
|
|
106
|
+
/** Voided amount. */
|
|
107
|
+
amount?: string;
|
|
108
|
+
/** PSP-specific error code. */
|
|
109
|
+
errorCode?: string | null;
|
|
110
|
+
/** PSP-specific error message. */
|
|
111
|
+
errorMessage?: string | null;
|
|
112
|
+
}
|
|
113
|
+
/** Submit event request */
|
|
114
|
+
export interface SubmitEventRequest {
|
|
115
|
+
/** Event data. */
|
|
116
|
+
event: ProviderPlatformEvent;
|
|
117
|
+
}
|
|
118
|
+
/** Submit event response */
|
|
119
|
+
export interface SubmitEventResponse {
|
|
120
|
+
}
|
|
@@ -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":""}
|
|
@@ -0,0 +1,137 @@
|
|
|
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 ignored, do not send it.
|
|
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
|
+
/** Issuer (business) identification number. First 6 or 8 digits of the card's number. */
|
|
85
|
+
bin?: string | null;
|
|
86
|
+
/** Last 4 digits of the card's number. */
|
|
87
|
+
lastFour?: string | null;
|
|
88
|
+
}
|
|
89
|
+
export interface CaptureEvent {
|
|
90
|
+
/** Wix transaction ID. */
|
|
91
|
+
wixTransactionId?: string;
|
|
92
|
+
/** Wix [reason code](https://dev.wix.com/docs/rest/business-management/payments/service-plugins/payment-service-provider-service-plugin/reason-codes#capture-declined) indicating request's status. */
|
|
93
|
+
reasonCode?: number;
|
|
94
|
+
/** Capture amount. */
|
|
95
|
+
amount?: string;
|
|
96
|
+
/** PSP-specific error code. */
|
|
97
|
+
errorCode?: string | null;
|
|
98
|
+
/** PSP-specific error message. */
|
|
99
|
+
errorMessage?: string | null;
|
|
100
|
+
}
|
|
101
|
+
export interface VoidEvent {
|
|
102
|
+
/** Wix transaction ID. */
|
|
103
|
+
wixTransactionId?: string;
|
|
104
|
+
/** PSP void ID. */
|
|
105
|
+
reasonCode?: number;
|
|
106
|
+
/** Voided amount. */
|
|
107
|
+
amount?: string;
|
|
108
|
+
/** PSP-specific error code. */
|
|
109
|
+
errorCode?: string | null;
|
|
110
|
+
/** PSP-specific error message. */
|
|
111
|
+
errorMessage?: string | null;
|
|
112
|
+
}
|
|
113
|
+
/** Submit event request */
|
|
114
|
+
export interface SubmitEventRequest {
|
|
115
|
+
/** Event data. */
|
|
116
|
+
event: ProviderPlatformEvent;
|
|
117
|
+
}
|
|
118
|
+
/** Submit event response */
|
|
119
|
+
export interface SubmitEventResponse {
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* This Wix API is used by a Payment Service Provider (PSP) to send webhooks about payment and refund states to Wix.
|
|
123
|
+
*
|
|
124
|
+
* 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}`.
|
|
125
|
+
* PSP's create their own version numbers.
|
|
126
|
+
*
|
|
127
|
+
* > You cannot try out this endpoint because an `Authorization` header value has to be obtained
|
|
128
|
+
* > with the OAuth 2.0 client credentials flow for a specific scope.
|
|
129
|
+
* > So please ignore the **Authorization** section below as well as the **Try It Out** button.
|
|
130
|
+
* @param event - Event data.
|
|
131
|
+
* @public
|
|
132
|
+
* @requiredField event
|
|
133
|
+
* @permissionId CASHIER.GET_ACCESS
|
|
134
|
+
* @returns Submit event response
|
|
135
|
+
* @fqn wix.payments.v1.provider_platform_events.ProviderPlatformEventsService.SubmitEvent
|
|
136
|
+
*/
|
|
137
|
+
export declare function submitEvent(event: ProviderPlatformEvent): Promise<void>;
|
|
@@ -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;AAuInI;;;;;;;;;;;;;;;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';
|
package/build/es/meta.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"meta.js","sourceRoot":"","sources":["../../meta.ts"],"names":[],"mappings":"AAAA,cAAc,qEAAqE,CAAC"}
|
|
@@ -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';
|
|
@@ -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
|
|
@@ -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>;
|