In my android app the payment fails when my customer pay by credit card (without login to PayPal)

LuigiQuesada
Contributor
Contributor

Hi people,

 

I've a big problem and I can't find the solution. In my Android App, credit card payment always fails (see picture 1) with any credit card, I speak of the case without login to paypal (see picture 2). If I pay with a paypal account by login, either with the paypal balance or with a registered card, everything works fine.

 

 picture 1

Image2.png

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

picture 2

Image1.png

 

 

 

 

 

 

 

 

 

 

 

 

 

This is my code (only relevant parts):

 

PayPalConfiguration cfgPayPal = new PayPalConfiguration()
.environment(PayPalConfiguration.ENVIRONMENT_PRODUCTION)
.clientId(Constants.PAYPAL_CLIENT_ID)
.acceptCreditCards(true);

 

Intent iPPS = new Intent(ctx, PayPalService.class);
iPPS.putExtra(PayPalService.EXTRA_PAYPAL_CONFIGURATION, cfgPayPal);
context.startService(iPPS);

 

PayPalPayment itemsToBuy = getItemsToBuy(PayPalPayment.PAYMENT_INTENT_SALE);
Intent iPA = new Intent(context, PaymentActivity.class);
iPA.putExtra(PayPalService.EXTRA_PAYPAL_CONFIGURATION, cfgPayPal);
iPA.putExtra(PaymentActivity.EXTRA_PAYMENT, itemsToBuy);
startActivityForResult(iPA, Constants.PAYPAL_REQUEST_CODE);

 

private PayPalPayment getItemsToBuy(String paymentIntent) {
return new PayPalPayment(
new BigDecimal(dOrderTotalValue),
Constants.PAYPAL_CURRENCY,
getString(R.string.lab_order_code)+": "+sOrderCode,
paymentIntent
);
}
Login to Me Too
2 REPLIES 2

MTS_Andre
Moderator
Moderator

Hi, I can't see the error image, only the second picture. Do you have the full error message and the log for the error returned? I will try to see if I can find the API request that returned this error in our logs.

Login to Me Too

LuigiQuesada
Contributor
Contributor

Hi, I've spoke with PP expert and he told me that for Italy the direct credit card payment doesn't work, this method work only in USA, Canada and UK. Thanks for your help.

Login to Me Too

Haven't Found your Answer?

It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.