SatheeshCK17
SatheeshCK17

Reputation: 523

Stripe popup showing wrong currency

I've successfully setup Stripe checkout using noodliopay example (here) using ionic framework and angularJS. I've set the currency to pounds on charging the amount, but the popup button is still showing the dollar symbol. Below is a code snippet from factory

self.chargeUser = function(stripeToken, ProductMeta) {
    var qCharge = $q.defer();
    var chargeUrl = NOODLIO_PAY_API_URL + "/charge/token";

    var param = {
        source: stripeToken,
        amount: Math.floor(ProductMeta.priceGBP*100), // amount in penny
        currency: "gbp",
        description: "",
        stripe_account: STRIPE_ACCOUNT_ID,
        test: true
    };

    $http.post(NOODLIO_PAY_API_URL + "/charge/token", param)
    .success(
        function(StripeInvoiceData){
            qCharge.resolve(StripeInvoiceData);
        }
    )
    .error(
        function(error){
            console.log(error)
            qCharge.reject(error);
        }
    );
    return qCharge.promise;
}

enter image description here

Can anyone help me with this?Is there any way to change the currency symbol?

Upvotes: 1

Views: 1019

Answers (1)

SatheeshCK17
SatheeshCK17

Reputation: 523

For payment through Stripe there are two steps:

  1. Get Stripe token
  2. Charge the card

Earlier, I was adding the currency key on charging the card as seen in the example. But, when I added currency on getting stripe token, the issue is solved.

Thanks

Upvotes: 1

Related Questions