cancel
Showing results for 
Search instead for 
Did you mean: 

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

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

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

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

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
);
}
2 REPLIES
Moderator

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

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.

Highlighted

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

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.