This repository has been archived by the owner on Sep 11, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathpayment-CREDIT_CARD.json
200 lines (200 loc) · 6.25 KB
/
payment-CREDIT_CARD.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
{
"key": "payment-CREDIT_CARD",
"name": {
"en": "Credit Card Payment Resource"
},
"description": {
"en": "extends the CTP Payment Resource with the standard fields for a Credit Card payment. NEVER store Credit Card Data that fall under PCI DSS compliance in the commercetools platform. Always use the `cardDataPlaceholder` field to store the placeholder / token / id you have received from the direct communication of the browser with the PSP."
},
"resourceTypeIds": [
"payment"
],
"fieldDefinitions": [
{
"name": "languageCode",
"type": {
"name": "String"
},
"label": {
"en": "Hint to the PSP integration service, which language to take from CTP LString / LEnum data. ISO language code."
},
"required": true,
"inputHint": "SingleLine"
},
{
"name": "reference",
"type": {
"name": "String"
},
"label": {
"en": "Short reference code to appear as first item in the client's bank account. Must be unique across all payments with the given PSP. Should be globally unique."
},
"required": true,
"inputHint": "SingleLine"
},
{
"name": "referenceText",
"type": {
"name": "String"
},
"label": {
"en": "Text to appear in the credit card statement in addition to the reference ID which defaults to the Order Number"
},
"required": false,
"inputHint": "MultiLine"
},
{
"name": "redirectUrl",
"type": {
"name": "String"
},
"label": {
"en": "Redirect URL passed from the PSP integration to the frontend. If this field is set, it represents an instruction to the client implememtation to immediately redirect the User to the given place. Can / should be removed when the user hits the succes / error / cancel URLs."
},
"required": false,
"inputHint": "SingleLine"
},
{
"name": "successUrl",
"type": {
"name": "String"
},
"label": {
"en": "Absolute URL set by the checkout client implementation that tells the PSP where to direct the Client after the steps in a redirect flow have been completed successfully."
},
"required": false,
"inputHint": "SingleLine"
},
{
"name": "errorUrl",
"type": {
"name": "String"
},
"label": {
"en": "Absolute URL set by the checkout client implementation that tells the PSP where to direct the Client when a technical error has happened or the transaction has been denied in a redirect flow."
},
"required": false,
"inputHint": "SingleLine"
},
{
"name": "cancelUrl",
"type": {
"name": "String"
},
"label": {
"en": "Absolute URL set by the checkout client implementation that tells the PSP where to direct the Client when the client has used a function in the redirect flow that cancels the process."
},
"required": false,
"inputHint": "SingleLine"
},
{
"name": "force3DSecure",
"type": {
"name": "Boolean"
},
"label": {
"en": "Advises the PSP API to do a 3dsecure cross-check independently of whether that is implied in the payment method key or already preconfigured in the PSP backend."
},
"required": false
},
{
"name": "cardDataPlaceholder",
"type": {
"name": "String"
},
"label": {
"en": "After having submitted the actual Credit Card data directly from the User Agent to the PSP API, most APIs return a placeholder id / token / key / number for the data. If the information is not implicit in another field (e.g. the interfaceId of the payment) this value has to be set here. DO NOT WRITE ACTUAL CREDIT CARD DATA."
},
"required": false,
"inputHint": "SingleLine"
},
{
"name": "maskedCardNumber",
"type": {
"name": "String"
},
"label": {
"en": "Some Payment APIs return an anonymized version of the credit card number that is allowed to be saved to be shown to the buyer to ease the buyer's memory what card has been used to pay. This is to be set here. It is a bad Idea to generate anonymized numbers yourself, because that implies you are \"touching\" the raw number which leads to PCI compliance issues."
},
"required": false,
"inputHint": "SingleLine"
},
{
"name": "cardHolderName",
"type": {
"name": "String"
},
"label": {
"en": "The name of the Card Holder as given on the card."
},
"required": false,
"inputHint": "SingleLine"
},
{
"name": "cardExpiryDate",
"type": {
"name": "Date"
},
"label": {
"en": "Card expiry date. As Card expiry dates are months only, the day set here is considered a no-information. If this field is inteded to be used semantically, the last day of the expiration month of the card should be used."
},
"required": false
},
{
"name": "cardNetwork",
"type": {
"name": "Enum",
"values": [
{
"key": "VISA",
"label": "Visa"
},
{
"key": "MASTERCARD",
"label": "MasterCard"
},
{
"key": "DISCOVER",
"label": "Discover"
},
{
"key": "AMERICAN_EXPRESS",
"label": "American Express"
},
{
"key": "DINERS_CLUB",
"label": "Diners Club"
},
{
"key": "JCB",
"label": "JCB"
},
{
"key": "CARTE_BANCAIRE",
"label": "CB (Carte Bancaire / Carte Bleue)"
},
{
"key": "MAESTRO_UK",
"label": "Maestro Card UK (Debit Card)"
},
{
"key": "MAESTRO_INTERNATIONAL",
"label": "Maestro Card International (Debit Card)"
},
{
"key": "SWITCH",
"label": "Switch / Solo"
},
{
"key": "UATP",
"label": "UATP"
}
]
},
"label": {
"en": "Name of the Card Network (e.g. MasterCard, VISA, etc.)"
},
"required": false
}
]
}