Skip to content

Commit

Permalink
fix: card number parsing error
Browse files Browse the repository at this point in the history
  • Loading branch information
kiremitrov123 committed May 11, 2023
1 parent e96180d commit 66bd0f1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/services/inplayer.checkout.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ export const updateOrder: UpdateOrder = async ({ order, couponCode }) => {

export const directPostCardPayment = async (cardPaymentPayload: CardPaymentData, order: Order) => {
const payload = {
number: parseInt(`${cardPaymentPayload.cardNumber}`),
number: cardPaymentPayload.cardNumber,
cardName: cardPaymentPayload.cardholderName,
expMonth: cardPaymentPayload.cardExpMonth || '',
expYear: cardPaymentPayload.cardExpYear || '',
Expand All @@ -164,6 +164,7 @@ export const directPostCardPayment = async (cardPaymentPayload: CardPaymentData,

try {
if (isSVODOffer(order)) {
// @ts-ignore
await InPlayer.Subscription.createSubscription(payload);
} else {
await InPlayer.Payment.createPayment(payload);
Expand Down

0 comments on commit 66bd0f1

Please sign in to comment.