Skip to content
This repository has been archived by the owner on Nov 6, 2018. It is now read-only.

ReactNativeJS: { [TypeError: undefined is not an object (evaluating 'h.paymentRequestWithAndroidPay')] #2

Closed
SimoneLSK opened this issue Sep 18, 2018 · 5 comments · Fixed by expo/expo#2516
Assignees

Comments

@SimoneLSK
Copy link

SimoneLSK commented Sep 18, 2018

Platform : AN 
ENV: Signed APK
SDK: both 30 & 29 with expo-payments-stripe installed 

when execute **Stripe.paymentRequestWithAndroidPayAsync()** which caught error
screen shot 2018-09-19 at 4 02 39 am

I am not sure if it is a bug or because my app's payment function still has not approved by Google.

async componentWillMount(){
        await Stripe.setOptionsAsync({
            publishableKey: publishableKey, 
            androidPayMode: 'test', 
        });
}

makePayment = async (options) => {
    try{
        token = await Stripe.paymentRequestWithAndroidPayAsync(options);
    } catch (err) {
        console.log(err)
    }
}

Thanks

@esamelson
Copy link
Contributor

Hi @SimoneLSK - are you using this module in an ExpoKit project, or vanilla React Native?

@SimoneLSK
Copy link
Author

SimoneLSK commented Sep 20, 2018

Hi @esamelson ,

Using this module with ExpoKit.
When the apps running in development mode by expo start, I was able to call the google payment sheet.
Its only not working with Signed APK.

Procedure:

  1. run expo start
  2. run run... in android studio, (App installed on simulator)
  3. execute Stripe.paymentRequestWithAndroidPayAsync(), (Payment Sheet Appeared)
  4. run expo publish
  5. run Generated Signed APK in android studio
  6. install APK and execute Stripe.paymentRequestWithAndroidPayAsync() (No Payment Sheet Appeared)

@sjchmiela
Copy link
Contributor

Hi @SimoneLSK! Could you please verify if instructions provided here resolve the issue?

@sjchmiela sjchmiela assigned sjchmiela and unassigned Szymon20000 Sep 26, 2018
@SimoneLSK
Copy link
Author

Hi
I am currently away from town
Will try this when back
Thanks

@heyaj19
Copy link

heyaj19 commented Oct 25, 2018

@sjchmiela Its not working. I am facing the same issue - those proguard rules and settings are already in the build.gradle.

It works fine if I remove the stripe.publishableKey line out. But when its in there it doesn't work. Any suggestons?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants