Ionic Paypal Integration

Hi, All
I am working on the paypal integration to my ionic app,…Happily i could easily implement the paypal in USD(dollar) , but when I tried in INR(Indian rupee) it shows an error.
Payment not processable
Could you please help me on this,

Thanks in advance…

we need some code or your paypal settings.

are you using paypal cordova plugin?

Thanks for your reply…
Yes I am using paypal cordova plugin…
Here is the my code snippet…

$ionicPlatform.ready().then(function () {
PayPalMobile.renderSinglePaymentUI(new PayPalPayment("" + total, “INR”, “” + name, “PAYMENT_INTENT_SALE”), function (result) {
$timeout(function () {
}, function (error) {
$timeout(function () {
Worked fine when I change INR to USD
But I need it as in INR

i think INR is not supported:

Oh no…Thanks for your reply,What I will do,is there any resolution exists ,I need that get it done in both INR and USD…

Sad to hear…


for paypal not… not… maybe you can build a workaround --> show your customers the price in INR and make the checkout in USD.

There is no need to worry about, if you buy it with usd… on you bank account you will finally see you default currency.

1 Like

An another error comes out this time when I tried to change sandbox to live ,
The provided environment is not supported when PayPalMobile.init() is called,
Here is my code snippet
var payPalEnv = localStorage.getItem(“payPalEnv”);
var clientId = localStorage.getItem(“clientId”);
init_defer = $q.defer();
$ionicPlatform.ready().then(function () {

                            var clientIDs = {
                                "PayPalEnvironmentProduction": clientId,
                                "PayPalEnvironmentSandbox": "AQcxJhjEj36pS4SB7Qt2akLeiYic0WzeAwg_z2anq5PcAuEzFi5MaBRoLhQVrpcxW8oDuwazCDfTzNkm"
                            PayPalMobile.init(clientIDs, function () {
                                $ionicPlatform.ready().then(function () {
                                    // must be called
                                    // use PayPalEnvironmentNoNetwork mode to get look and feel of the flow
                                    PayPalMobile.prepareToRender(payPalEnv, new PayPalConfiguration({
                                        merchantName: "shop name",
                                        merchantPrivacyPolicyURL: "",
                                        merchantUserAgreementURL: ""
                                    }), function () {

                                        $timeout(function () {
                        return init_defer.promise;

Could you please help me on this
Thanks in advance…

sounds like your env-variable is not valid.
what is the exact value stored in payPalEnv

I gave payPalEnv="Production"

Sandbox means --> Test/Development for you… in a sandbox you can test transactions without paying for those

Production = reallife, you app is online and your customers want to buy stuff and you want the “real” money :smile:

That is why you have to set them!

1 Like

Thanx for the clarification.:relaxed:


Use ‘’ to convert USD to IND, I user this api to convert USD to ZAR
then pass the converted value rate * USD equivalence to paypal

eg. PaypalService.makePayment($scope.user.value*$scope.dollarRand)

where $scope.dollarRand is the converted rate I got from the above API

Sir are u fixed above error, actually I am facing same error can u tell me how to fix it?

Sir can you tell me how to use above code?

Sir I have follow the same process but according to client it’s wrong.
Suppose amount= 124 in INR currency and I convert currency to USD but in checkout screen why currency is showing wrong here.check below screenshot sir tell me sir what I do in such case?