Reputation: 523
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;
}
Can anyone help me with this?Is there any way to change the currency symbol?
Upvotes: 1
Views: 1019
Reputation: 523
For payment through Stripe there are two steps:
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