Skip to content

Commit ff8901f

Browse files
authored
W-21004748: add updates needed for Payments Configuration API and other Adyen support (#270)
* W-21004748: add updates needed for Payments Adyen support (#269)
1 parent a7adeff commit ff8901f

File tree

2 files changed

+56
-45
lines changed

2 files changed

+56
-45
lines changed

apis/shopper-payments-oas-1.2.3/shopper-payments-oas-v1-public.yaml

Lines changed: 55 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,17 @@ paths:
2121
- $ref: '#/components/parameters/currency'
2222
- $ref: '#/components/parameters/countryCode'
2323
- $ref: '#/components/parameters/zoneId'
24+
- $ref: '#/components/parameters/amount'
2425
get:
2526
description: |-
2627
Retrieves the payment configuration for the organization.
2728
2829
**Parameters:**
2930
- `siteId`: Required. The site identifier for context-specific configuration
3031
- `currency`: Required. Three-letter currency code (ISO 4217) for payment method configuration
31-
- `countryCode`: Required. Two-letter country code (ISO 3166-1 alpha-2) for country-specific payment configuration
32+
- `countryCode`: Optional. Two-letter country code (ISO 3166-1 alpha-2) for country-specific payment configuration
33+
- `amount`: Optional. Transaction amount for payment method configuration
34+
- `zoneId`: Optional. Payment zone identifier to retrieve zone-specific configuration
3235
3336
**Response Behavior:**
3437
- Returns payment configuration data when available
@@ -49,8 +52,10 @@ paths:
4952
examples:
5053
stripeConfiguration:
5154
$ref: '#/components/examples/PaymentConfigurationGetForStripe'
52-
paypalConfiguration:
55+
stripeAndPaypalConfiguration:
5356
$ref: '#/components/examples/PaymentConfigurationGetForStripeAndPaypal'
57+
adyenConfiguration:
58+
$ref: '#/components/examples/PaymentConfigurationGetForAdyen'
5459
noDataFound:
5560
$ref: '#/components/examples/PaymentConfigurationNoDataFound'
5661
tags:
@@ -102,6 +107,13 @@ components:
102107
minLength: 1
103108
maxLength: 100
104109
nullable: true
110+
Amount:
111+
type: number
112+
format: double
113+
description: The transaction amount.
114+
minimum: 0
115+
example: 100
116+
nullable: true
105117
PaymentConfiguration:
106118
type: object
107119
properties:
@@ -139,42 +151,13 @@ components:
139151
description: Account BN code (optional, null if not a PayPal account)
140152
example: Example_PPCP
141153
maxLength: 100
142-
additionalProperties: true
143-
gatewayId:
144-
type: string
145-
description: Gateway identifier
146-
example: 0b0SB000000IpdZYAS
147-
minLength: 1
148-
gatewayResponse:
149-
type: object
150-
nullable: true
151-
description: Gateway response data (optional, can be null)
152-
properties:
153154
paymentMethods:
154-
type: array
155-
description: Available payment methods from gateway
156-
items:
157-
type: object
158-
properties:
159-
brands:
160-
type: array
161-
description: Supported card brands
162-
items:
163-
type: string
164-
example: visa
165-
example:
166-
- amex
167-
- cup
168-
- diners
169-
- discover
170-
- mc
171-
- visa
172-
type:
173-
type: string
174-
description: Payment method type
175-
example: scheme
155+
type: object
156+
nullable: true
157+
description: Available payment methods from gateway (optional, null if not an Adyen account)
158+
additionalProperties: true
176159
additionalProperties: true
177-
isLive:
160+
live:
178161
type: boolean
179162
description: Whether the account is in live mode
180163
example: false
@@ -184,8 +167,7 @@ components:
184167
example: Stripe
185168
required:
186169
- accountId
187-
- gatewayId
188-
- isLive
170+
- live
189171
- vendor
190172
paymentMethods:
191173
type: array
@@ -263,6 +245,13 @@ components:
263245
value: Amer-Zone
264246
schema:
265247
$ref: '#/components/schemas/ZoneId'
248+
amount:
249+
name: amount
250+
in: query
251+
description: The transaction amount. Optional. Some gateways, such as Adyen, allow for payment methods to be qualified or disqualified based on the amount of the transaction.
252+
required: false
253+
schema:
254+
$ref: '#/components/schemas/Amount'
266255
examples:
267256
PaymentConfigurationGetForStripe:
268257
value:
@@ -271,8 +260,7 @@ components:
271260
- accountId: acct_1RegszI5I22eU0I3
272261
config:
273262
key: pk_test_JsbBx7imKb7n7Xtlb5MH5BNO00ttiURmPV
274-
gatewayId: 0b0SB000000IpdZYAS
275-
isLive: false
263+
live: false
276264
vendor: Stripe
277265
paymentMethods:
278266
- accountId: acct_1RegszI5I22eU0I3
@@ -286,15 +274,13 @@ components:
286274
- accountId: acct_1RegszI5I22eU0I3
287275
config:
288276
key: pk_test_JsbBx7imKb7n7Xtlb5MH5BNO00ttiURmPV
289-
gatewayId: 0b0SB000000IpdZYAS
290-
isLive: false
277+
live: false
291278
vendor: Stripe
292279
- accountId: XK92PMVFNRBDG
293280
config:
294281
bnCode: SalesforceCommerceCloud_PPCP
295282
key: AYzMrnD7y4Zc5m5QJZTQ4zPKbP8TMn0r7aStK_3hM9gnaykL-VwK5tGQj4g1y93V6UNvC5j_FZSSa6xpR
296-
gatewayId: 0b0SB000000IpdZEU
297-
isLive: false
283+
live: false
298284
vendor: Paypal
299285
paymentMethods:
300286
- accountId: acct_1RegszI5I22eU0I3
@@ -305,6 +291,31 @@ components:
305291
paymentMethodType: paypal
306292
paymentModes:
307293
- Multistep
294+
PaymentConfigurationGetForAdyen:
295+
value:
296+
zoneId: Amer-Zone
297+
paymentMethodSetAccounts:
298+
- accountId: TestAccount941ECOM
299+
config:
300+
key: test_JE2ML2CMKZHJRL3QWUW4YCE32A3SL3BH
301+
paymentMethods:
302+
paymentMethods:
303+
- brands:
304+
- amex
305+
- cup
306+
- diners
307+
- discover
308+
- mc
309+
- visa
310+
name: Cards
311+
type: scheme
312+
live: false
313+
vendor: Adyen
314+
paymentMethods:
315+
- accountId: TestAccount941ECOM
316+
paymentMethodType: card
317+
paymentModes:
318+
- Multistep
308319
PaymentConfigurationNoDataFound:
309320
value:
310321
zoneId: null

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@
185185
},
186186
{
187187
"path": "commerce-sdk-isomorphic-with-deps.tgz",
188-
"maxSize": "2.65 MB"
188+
"maxSize": "2.9 MB"
189189
}
190190
],
191191
"proxy": "https://SHORTCODE.api.commercecloud.salesforce.com"

0 commit comments

Comments
 (0)