Skip to content

Commit 2269a79

Browse files
Phatyebuzuloiu
authored andcommitted
Add support for MOTO in credit card payments extension schema
1 parent 49f23ca commit 2269a79

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

packages/app/src/cli/models/extensions/specifications/payments_app_extension_schemas/credit_card_payments_app_extension_schema.test.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ const config: CreditCardPaymentsAppExtensionConfigType = {
2121
supported_countries: ['CA'],
2222
supported_payment_methods: ['PAYMENT_METHOD'],
2323
supported_buyer_contexts: [{currency: 'USD'}, {currency: 'CAD'}],
24+
supports_moto: true,
2425
supports_3ds: false,
2526
test_mode_available: true,
2627
supports_deferred_payments: false,
@@ -194,6 +195,7 @@ describe('creditCardPaymentsAppExtensionDeployConfig', () => {
194195
supported_payment_methods: config.supported_payment_methods,
195196
supported_buyer_contexts: config.supported_buyer_contexts,
196197
test_mode_available: config.test_mode_available,
198+
supports_moto: config.supports_moto,
197199
supports_3ds: config.supports_3ds,
198200
supports_deferred_payments: config.supports_deferred_payments,
199201
supports_installments: config.supports_installments,

packages/app/src/cli/models/extensions/specifications/payments_app_extension_schemas/credit_card_payments_app_extension_schema.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ export const CreditCardPaymentsAppExtensionSchema = BasePaymentsAppExtensionSche
2929
targeting: zod.array(zod.object({target: zod.literal(CREDIT_CARD_TARGET)})).length(1),
3030
verification_session_url: zod.string().url().optional(),
3131
ui_extension_handle: zod.string().optional(),
32+
supports_moto: zod.boolean(),
3233
encryption_certificate_fingerprint: zod
3334
.string()
3435
.min(1, {message: "Encryption certificate fingerprint can't be blank"}),
@@ -72,6 +73,7 @@ export interface CreditCardPaymentsAppExtensionDeployConfigType extends BasePaym
7273
supports_3ds: boolean
7374

7475
// CreditCard-specific fields
76+
supports_moto: boolean
7577
start_verification_session_url?: string
7678
ui_extension_registration_uuid?: string
7779
ui_extension_handle?: string
@@ -106,6 +108,7 @@ export function creditCardDeployConfigToCLIConfig(
106108
supported_buyer_contexts: config.supported_buyer_contexts,
107109
test_mode_available: config.test_mode_available,
108110
supports_3ds: config.supports_3ds,
111+
supports_moto: config.supports_moto,
109112
supports_deferred_payments: config.supports_deferred_payments,
110113
supports_installments: config.supports_installments,
111114
verification_session_url: config.start_verification_session_url,
@@ -132,6 +135,7 @@ export async function creditCardPaymentsAppExtensionDeployConfig(
132135
supported_buyer_contexts: config.supported_buyer_contexts,
133136
test_mode_available: config.test_mode_available,
134137
supports_3ds: config.supports_3ds,
138+
supports_moto: config.supports_moto,
135139
supports_deferred_payments: config.supports_deferred_payments,
136140
encryption_certificate_fingerprint: config.encryption_certificate_fingerprint,
137141
supports_installments: config.supports_installments,

0 commit comments

Comments
 (0)