Home > front end >  ionic3 Stripe returning error code "AccessDenied"
ionic3 Stripe returning error code "AccessDenied"

Time:03-24

I have integrated Stripe payment in my ionicv3 app. Earlier it was working fine but suddenly it has started giving me below error:

enter image description here

enter image description here

Stripe code in my app:

let elements = this.stripe.elements()

var style = {// style code}

this.card = elements.create('card', {
            style: style
        })

this.card.mount('#card-element')

The error occurs after mount function.

Stripe plugin:

cordova-plugin-stripe: ^1.5.3
@ionic-native/stripe: ^4.17.0

ionic info

cli packages: (C:\Users\<user_name>\AppData\Roaming\nvm\v8.9.4\node_modules)

    @ionic/cli-utils  : 1.19.2
    ionic (Ionic CLI) : 3.20.0

global packages:

    cordova (Cordova CLI) : 8.0.0

local packages:

    @ionic/app-scripts : 3.1.9
    Cordova Platforms  : android 8.0.0
    Ionic Framework    : ionic-angular 3.9.2

System:

    Node : v8.9.4
    npm  : 5.6.0
    OS   : Windows 10

Environment Variables:

    ANDROID_HOME : C:\Users\<user_name>\AppData\Local\ANDROID\sdk;C:\Users\<user_name>\AppData\Local\ANDROID\sdk\build-tools;C:\Users\<user_name>\AppData\Local\ANDROID\sdk\tools;C:\Users\<user_name>\AppData\Local\ANDROID\sdk\platform-tools;C:\Users\<user_name>\AppData\Local\ANDROID\sdk\tools\bin;

Misc:

    backend : pro

CodePudding user response:

OK. The error occurred because somehow the script tag <script src="https://js.stripe.com/v3/"></script> was deleted from index.html file. Adding this tag fixed the issue.

  • Related