question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

paymentRequestWithCardForm Crashing App

See original GitHub issue

I am running into an issue when I try to call paymentRequestWithCardForm. I get the following error, which crashes my app.

'*** -[__NSCFConstantString stringByAppendingString:]: nil argument' was thrown while invoking paymentRequestWithCardForm on target TPSStripeManager with params (
        {
        requiredBillingAddressFields = full;
        smsAutofillDisabled = 1;
        theme =         {
        };
    },
    70,
    71
)

Function Invocation

handleCardPayPress = async () => {
      try {
        this.setState({
          loading: true,
          token: null,
        })
        console.log(stripe,'inner stripe');
        const token = stripe.paymentRequestWithCardForm({
          // Only iOS support this options
          smsAutofillDisabled: true,
          requiredBillingAddressFields: 'full',
          prefilledInformation: {
            billingAddress: {
              name: 'Gunilla Haugeh',
              line1: 'Canary Place',
              line2: '3',
              city: 'Macon',
              state: 'Georgia',
              country: 'US',
              postalCode: '31217',
              email: 'ghaugeh0@printfriendly.com',
            },
          },
        })

How I call it

                <ARButton
                    style={[styles.changeBtn,styles.btn]}
                    title="CHANGE PAYMENT INFORMATION"
                    type={2}
                    onPress={this.handleCardPayPress}
                    // onPress={()=>this.props.navigation.navigate('PaymentInfo')}
                />

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

5reactions
Uki19commented, Aug 1, 2017

I had this issue, the problem was that I forgot to set publishableKey. Don’t forget to add stripe.init({ publishableKey: 'YOUR_PUBLISHABLE_KEY', });

0reactions
isnifercommented, Nov 6, 2017

Fixed in #109

Read more comments on GitHub >

github_iconTop Results From Across the Web

react native - PaymentSheet Crashing on Android in v.0.19.0
In stripe-react-native v0.19.0, on Android (13 and 10), presentPaymentSheet call crashes the app without any errors.
Read more >
Stripe React Native - The Most Common Questions - Tipsi ...
The only missing functionality is the paymentRequestWithCardForm function that opens the Add Card view to accept a payment.
Read more >
Linking · tipsi-stripe
Automatically. Run react-native link tipsi-stripe so your project is linked against your Xcode project and all CocoaPods dependencies are installed.
Read more >
flutter_stripe_payment
Hi, I'm trying to integrate stripe_payment into my app for native payments and my app is crashing. Android 10 API 29. `StripePayment.setOptions( StripeOptions(...
Read more >
A Flutter Plugin with stripe Payment Plugin Integration - Morioh
For SCA compliant apps, setup payment intents for later confirmation. · cancelNativePayRequest() · paymentRequestWithCardForm() · createTokenWithCard() ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found