From 3cc4673df3b2f7c80360d5a4116d6e804ddb18ab Mon Sep 17 00:00:00 2001 From: deryacakmak <97deryacakmak@gmail.com> Date: Mon, 14 Oct 2024 11:17:50 +0300 Subject: [PATCH 1/2] Add enabledInstallment field to Garanti Pay Init Request --- samples/payment/InitGarantiPayPayment.js | 1 + src/model/WebhookEventType.ts | 4 +++- src/request/InitGarantiPayPaymentRequest.ts | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/samples/payment/InitGarantiPayPayment.js b/samples/payment/InitGarantiPayPayment.js index 87e5799..e3e4aa0 100644 --- a/samples/payment/InitGarantiPayPayment.js +++ b/samples/payment/InitGarantiPayPayment.js @@ -19,6 +19,7 @@ const request = { totalPrice: 125 } ], + enabledInstallments: [2,3], conversationId: '456d1297-908e-4bd6-a13b-4be31a6e47d5', currency: Craftgate.Model.Currency.TRY, paymentGroup: Craftgate.Model.PaymentGroup.ListingOrSubscription, diff --git a/src/model/WebhookEventType.ts b/src/model/WebhookEventType.ts index 4faf5e0..336b738 100644 --- a/src/model/WebhookEventType.ts +++ b/src/model/WebhookEventType.ts @@ -9,7 +9,9 @@ enum WebhookEventType { Autopilot = 'AUTOPILOT', WalletCreated = 'WALLET_CREATED', WalletTxCreated = 'WALLET_TX_CREATED', - BnplNotification = 'BNPL_NOTIFICATION' + BnplNotification = 'BNPL_NOTIFICATION', + MULTI_PAYMENT_COMPLETED = 'MULTI_PAYMENT_COMPLETED', + BKM_EXPRESS_PAYMENT_NOTIFICATION = 'BKM_EXPRESS_PAYMENT_NOTIFICATION' } export default WebhookEventType; diff --git a/src/request/InitGarantiPayPaymentRequest.ts b/src/request/InitGarantiPayPaymentRequest.ts index 9c2a2ee..5d19c79 100644 --- a/src/request/InitGarantiPayPaymentRequest.ts +++ b/src/request/InitGarantiPayPaymentRequest.ts @@ -19,6 +19,7 @@ type InitGarantiPayPaymentRequest = { bankOrderId?: string; posAlias?: string; items: PaymentItem[]; + enabledInstallments: number[]; }; export default InitGarantiPayPaymentRequest; From 6e4983f574b5ed30ef1064013dbaa9b9b063a6d0 Mon Sep 17 00:00:00 2001 From: deryacakmak <97deryacakmak@gmail.com> Date: Tue, 15 Oct 2024 11:46:37 +0300 Subject: [PATCH 2/2] update --- src/model/WebhookEventType.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/model/WebhookEventType.ts b/src/model/WebhookEventType.ts index 336b738..f7d072c 100644 --- a/src/model/WebhookEventType.ts +++ b/src/model/WebhookEventType.ts @@ -10,8 +10,8 @@ enum WebhookEventType { WalletCreated = 'WALLET_CREATED', WalletTxCreated = 'WALLET_TX_CREATED', BnplNotification = 'BNPL_NOTIFICATION', - MULTI_PAYMENT_COMPLETED = 'MULTI_PAYMENT_COMPLETED', - BKM_EXPRESS_PAYMENT_NOTIFICATION = 'BKM_EXPRESS_PAYMENT_NOTIFICATION' + MultiPaymentCompleted = 'MULTI_PAYMENT_COMPLETED', + BkmExpressPaymentNotification = 'BKM_EXPRESS_PAYMENT_NOTIFICATION' } export default WebhookEventType;