razorpay / react-native-razorpay

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

How to disable only Pay Later payment option in Razorpay #395

Open ppv94 opened 2 years ago

ppv94 commented 2 years ago

Description

I want to hide some payment methods in Razorpay I am able to hide Net Banking and Wallet options but Pay Later doesn't hide.

below is my code

  var options = {
    image: '',
    currency: 'INR',
    key: '***********',
    amount: Amount*100,
    name: 'MY APP',
    prefill: {
      email: Email,
      contact: Number,
      name: Name
    },
    theme: {color: 'red'},
    method: {
      netbanking: false,
      card: true,
      wallet: false,
      upi: true,
      paylater: false
    },
  }

  RazorpayCheckout.open(options).then((data) => {})

How to hide Pay Later from payment options in react-native-razorpay

sabarikobagapau commented 2 years ago

Same issue here anyone please ?

Faarookh commented 2 years ago

i am also facing the same issue.

dupandey011 commented 2 years ago

You can try below code snippet in the checkout code in order to hide any payment method (for example paylater in below code)

config: { display: { hide: [{method: 'paylater'}] } }

abhipoojary commented 2 years ago

config: { display: { hide: [{method: 'paylater'}] } }

this is working... thank you for saving my time

Kailash-dev commented 1 year ago

not working in 2023 any other solution