Question

I use PayPal Android SDK to integrate PayPal payments in my app and it works fine. I am wondering, can I disable "card.io" support (where a user scan the credit card)? And as a result remove 4MB of .so "card.io" libs files? I cannot find any information on that neither on the official PayPal site nor Google.

enter image description here

Was it helpful?

Solution

As Jeff Brateman commented, there is a newly added section on this matter:

Disabling card.io card scanning

Future payments does not require card.io card scanning, so it is safe to remove the camera scanner libraries by removing the following folders within the lib directory: armeabi, armeabi-v7a, mips, and x86.

Single Payments can be configured to accept credit cards through manual entry, but without card scanning. To do so, remove the same libs above, and remove android.permission.CAMERA and android.permission.VIBRATE permissions from AndroidManifest.xml. If you wish to disable credit card support altogether, follow the above steps to reduce the permissions and sdk footprint, and add the following to the PayPalConfiguration initialization:

config.acceptCreditCards(false);

OTHER TIPS

if you disable that pay with card button , use this

intent.putExtra(PaymentActivity.EXTRA_SKIP_CREDIT_CARD, true);

In the new SDK you need to do this like this:

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

and then give object on the intent like this:

intent.putExtra(PayPalService.EXTRA_PAYPAL_CONFIGURATION, object);
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top