razorpay / react-native-razorpay

React Native wrapper for Razorpay's mobile SDKs
https://www.npmjs.com/package/react-native-razorpay
MIT License
124 stars 107 forks source link

Stucked on the Loading Page - Android #109

Closed devv-aman closed 5 years ago

devv-aman commented 6 years ago


Describe your issue in detail I'm trying to call Razorpay.open, but it stucks on a loading page

My Code

import React, { Component } from 'react';
import { View, Text, TouchableNativeFeedback } from 'react-native';
import RazorpayCheckout from 'react-native-razorpay';

import { styles } from './style';

class OnlinePayment extends Component {
         addMoneyHandler = () => {
             const options = {
                 description: 'Online Payment',
                 image: 'https://i.imgur.com/3g7nmJC.png',
                 currency: 'INR',
                 key: 'MY_KEY',
                 amount: '5000', // paise
                 external: {
                     wallets: ['paytm']
                 },
                 name: 'user name',
                 prefill: {
                     email: 'abc@abc.com',
                     contact: '9191919191',
                     name: 'name'
                 },
                 theme: {color: "#E63935"}
             }

             RazorpayCheckout.open(options).then((data) => {
                  console.log(data);
             }).catch((error) => {
                  console.log(`Error: ${error.code} | ${error.description}`);
             });
        }

        render() {
                return (
                       <TouchableNativeFeedback
                           style={styles.payOnlineButtonCont}
                           onPress={this.onlinePaymentHandler}
                      > 
                             <Text style={styles.addPayOnlineText}>Pay Online</Text>
                      </TouchableNativeFeedback>
                 )
          }
}

IDE Specs

Java 8 Gradle Version: 4.4

Screenshots

Screenshot

Thanks

Balasnest commented 6 years ago

@entrepaman This might happen due to internet issue. Did you manage to get it work?

iThink32 commented 5 years ago

closing due to inactivity,reopen if required.