Stripe error

  • Author
    Posts
  • #70725

    Nadine Charles
    Participant

    The store is in Grenada, West Indies (country code = GD) and our currency is Eastern Caribbean Dollar (Currency Code = XCD). So these settings have been added to WordPress/WooCommerce and all prices on the store are shown in XCD (aka ECD/EC$).

    However, Stripe does not accept XCD. So when we send an order through Stripe we’re getting the Javascript error message about the country GD not being unsupported.This is the error:

    Uncaught IntegrationError: Invalid value for paymentRequest(): country should be one of the following strings: AE, AT, AU, BE, BG, BR, CA, CH, CI, CR, CY, CZ, DE, DK, DO, EE, ES, FI, FR, GB, GR, GT, HK, HU, ID, IE, IN, IT, JP, LT, LU, LV, MT, MX, MY, NL, NO, NZ, PE, PH, PL, PT, RO, SE, SG, SI, SK, SN, TH, TT, US, UY. You specified: GD.

    So, this is what I need to happen once the user hits the Checkout button when paying by Stripe):

    -Convert the cart XCD value to USD by dividing by 2.67.

    -Convert the paymentRequest country from GD to US.

    And then send these to Stripe instead.

    So for example, the cart value is EC$100.00 and the customer checks out using Stripe payment. At the moment, WooCommerce automatically sends to Stripe: country = GD and amount = 100.00. Instead we need country = US and amount = 37.46 to be sent to Stripe. But the customer always sees EC$ on the front-end. The customer never sees US$ on the front-end.

    How can I:

    1. Fix conversion rate from XCD to USD by dividing 2.67

    2. Use USD on sending to Stripe.

You must be logged in to see replies to this topic. Click here to login or register