Skip to content

Commit 91c10fe

Browse files
updated klarna with create pp order request
1 parent 962a395 commit 91c10fe

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

packages/bigcommerce-payments-integration/src/bigcommerce-payments-alternative-methods/bigcommerce-payments-alternative-methods-payment-strategy.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,12 +157,23 @@ export default class BigCommercePaymentsAlternativeMethodsPaymentStrategy
157157

158158
if (methodId === 'klarna') {
159159
try {
160+
const orderId = await this.bigCommercePaymentsIntegrationService.createOrder(
161+
'bigcommerce_payments_apms',
162+
{
163+
gatewayId: 'bigcommerce_payments_apms',
164+
methodId: 'klarna',
165+
},
166+
);
167+
160168
const paymentData = {
161169
formattedPayload: {
162170
vault_payment_instrument: null,
163171
set_as_default_stored_instrument: null,
164172
device_info: null,
165173
method_id: methodId,
174+
paypal_account: {
175+
order_id: orderId,
176+
},
166177
},
167178
};
168179

packages/bigcommerce-payments-integration/src/bigcommerce-payments-types.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -606,6 +606,8 @@ export interface PayPalCreateOrderRequestBody extends HostedInstrument, VaultedI
606606
metadataId?: string;
607607
setupToken?: boolean;
608608
fastlaneToken?: string;
609+
methodId?: string;
610+
gatewayId?: string;
609611
}
610612

611613
export enum PayPalOrderStatus {

0 commit comments

Comments
 (0)