المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : بوابة سترايب Stripe للدفع الالكتروني حل مشكلة Invalid currency: KWD / OMR / BHD



Rise Company
30-12-2023, 21:43
بوابة سترايب Stripe للدفع الالكتروني حل مشكلة Invalid currency: kwd / OMR / BHD
Three-decimal currencies - invalid_request_error - currency
Invalid currency: kwd. Stripe accounts in GB do not support kwd.
5.124 KWD must be rounded to 5120 or 5130.

https://www.rise.company/upload/uploads/170396525161393.png

المشكلة :

عند عمل عملية دفع من الكويت / عمان / بحرين يفشل الدفع فى هؤلاء الدول فقط
اما باقى الدول تعمل بدون مشكلة ويظهر ان سبب الخطا هو

invalid_request_error - currency
Invalid currency: kwd. Stripe accounts in GB do not support kwd.

ويظهر بجانب الدفع ان الدفع 0 وليس القيمة الحقيقة واضح ان السبب فى العملة اذن

https://www.rise.company/upload/uploads/170396525095141.png

سبب المشكلة :

هناك عملات تعمل zero-decimal currencies يعنى مثلا السعر : 30$
وهناك عملات تعمل Three-decimal currencies مثلا: السعر : 30.000 KWD
Three-decimal currencies

The API supports three-decimal currencies for the standard payment flows, including Payment Intents, Refunds, and Disputes. However, to ensure compatibility with Stripe’s payments partners, these API calls require the least-significant (last) digit to be 0. Your integration must round amounts to the nearest ten. For example, 5.124 KWD must be rounded to 5120 or 5130.
Three-decimal currencies:


BHD
JOD
KWD
OMR
TND



https://www.rise.company/upload/uploads/170396525119062.png
حل المشكلة :

اذا كان لديك موقع متعدد العملاء فقط فعل 3 decimals على تلك الدول فقط
الكويت KWD
البحرين OMR
عمان/ BHD
وهتجد ان المشكلة تم حلها

المرجع:
https://stripe.com/docs/currencies
https://wpml.org/forums/topic/stripe-charges-wrong-amount-for-kwd-currency/