Geek Geek -4 years ago 132
Android Question

Disable credit card payment option in paypal integration

I want to disable/hide a button with option for "credit card payment" in paypal integration to android application. Is there any way to do this?

Answer Source

In latest SDK below is the solution : (taken from another answer to keep this answer upto date)

PayPalConfiguration() object = new PayPalConfiguration();
object = object.acceptCreditCards(false);

intent.putExtra(PayPalService.EXTRA_PAYPAL_CONFIGURATION, object);

For older SDK :

Set below extra to an Intent that starts PaymentActivity. This will hide "Pay with credit card" button.

// Set extra to skip credit card payment.
intent.putExtra(PaymentActivity.EXTRA_SKIP_CREDIT_CARD, true);
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download