checkout-sdk-js
checkout-sdk-js copied to clipboard
Issue to make payment
I have implemented a checkout page using Checkout SDK. Since yesterday, we are facing an issue with Payment Processing.
Issue is with await service.submitOrder({ payment }) method response.
Error Message: MissingDataError: Unable to proceed because payment method data is unavailable or not properly configured.
Here is the Payment Parameter:
{ methodId: "stripe", paymentData: { ccExpiry: { month: 05, year: 11 }, ccName: "Name", ccNumber: "Card Number", ccType: "visa, ccCvv: 123 }, }
I have started getting this error after PR merge: https://github.com/bigcommerce/checkout-sdk-js/pull/1470.
We are having production site please help me to resolve this issue.
Hi there, we are looking into your issue. Can you please provide your sandbox/store URL?
Thank you so much for your quick response. Here is my store URL: https://signredesign.com/
Can you try replacing methodId stripe
with stripev3
and see if it is working?
I tried but it didn't work. I even try to implement the functionality to pay later (for now my client is looking to create orders) using below code but it didn't work. `await service.loadCheckout();
try { await service.finalizeOrderIfNeeded();
window.location.assign('/order-confirmation');
} catch (error) { if (error.type !== 'order_finalization_not_required') { throw error; } }` I am getting the following error for this code: OrderFinalizationNotRequiredError: The current order does not need to be finalized at this stage.
Please help me it is a production store.
If you believe new SDK causes the trouble, you can simply use an old SDK version from NPM or CDN. Please let me know if the problem disappears when you revert to a previous SDK version.
How can I use the previous version of sdk using NPM?
Specify a version in your checkout package.json
, then run npm install
.
https://github.com/bigcommerce/checkout-js/blob/5aad832465649922416c3cc89364d33f83dc6055/package.json#L37
@bc-peng I tried but it didn't work. It was working just fine and I didn't touch my code at all. Could you please suggest me another work around?
Hey @kulvirbal from what we can see is that this store is using native checkout and not custom checkout, is that correct?
Also from the store's payment endpoint payload gateway: "stripev3"
and method: "card"
. So I think your correct payload should be
{ gatewayId: "stripe3", methodId: "card", paymentData: { ccExpiry: { month: 05, year: 11 }, ccName: "Name", ccNumber: "Card Number", ccType: "visa, ccCvv: 123 }, }
Can you try the above please?
Hello @animesh1987 ,
Thank you for your reply. I have changed the current store to native BigCommerce Checkout as Checkout SDK has issues and we are having production store.
I have changed the params as per your suggestion but it is giving me different errors now:
NotInitializedError: Unable to proceed because the payment step of checkout has not been initialized.
I have tried gatewayId: "stripe3" and gatewayId: "stripev3" but nothing worked.
Have you initialised the stripe components? By that error it seems like you haven't run the process of initialising the or is thrown in the process of initialising the payment method. The above payload that I linked was for executing a payment.
I did initialize the process using the following code:
await service.initializePayment({ methodId: "card", gatewayId: "stripev3"});
could you please let me know if it the right way to initialize the method?
You can try this https://github.com/bigcommerce/checkout-sdk-js/blob/master/packages/core/src/payment/strategies/stripev3/stripev3-initialize-options.ts#L29 as reference, also will need to add gatewayId
to the payload.
So you can keep the above payload and add the stripev3
key to it.
@kulvirbal did you manage to try it out?
@animesh1987 I am again start getting the below error MissingDataError: Unable to proceed because payment method data is unavailable or not properly configured.
Can you please share the payloads you are using for initializePayment and submitOrder. Also the workflow you are implementing, since it seems like the error is in the payload sent.
Hey @kulvirbal is this still an issue?
Closing this due to inactivity