triniwiz / nativescript-stripe

Apache License 2.0
49 stars 32 forks source link

can't import library on iOS 14 #128

Closed mastashake08 closed 3 years ago

mastashake08 commented 3 years ago

After ns migrate to Nativescript 7 I get the following error Module not found: Error: Can't resolve 'nativescript-stripe'

I have to import like this import {mapGetters, mapActions, mapState} from 'vuex' import {Stripe} from '@triniwiz/nativescript-stripe' When I do this I get the error stripe.createToken does not exist as a fuction

triniwiz commented 3 years ago

Did you install the new package from @triniwiz/nativescript-stripe ?

Also the method is now createCardToken

mastashake08 commented 3 years ago

I figured that out but when I do the constructor new Stripe(key) it returns an empty object {} this.stripe = new Stripe(this.stripeKey)

mastashake08 commented 3 years ago

The card doesn't show up Screen Shot 2021-03-20 at 6 52 40 PM

triniwiz commented 3 years ago

You need to register the view

import Vue from 'nativescript-vue';
import CardView from '@triniwiz/nativescript-stripe/vue';
Vue.use(CardView);
mastashake08 commented 3 years ago

Bro I did that already. It's not working

triniwiz commented 3 years ago

Try CreditCardView

mastashake08 commented 3 years ago

That's what I did at first then I tried CardView

mastashake08 commented 3 years ago

Do you have WhatsApp?