"System error. Please try again later" when connecting to paypal sandbox account with my android app

rocksteadyla
New Community Member

My button calls the paypal window and I click on Pay with PayPal, but I get system error. Please try again later. I have tried 4 different sandbox account. 2 personal and 2 business and my personal account with multiple different password and I always get the same error message "system error. Please try again later". I checked the status of the paypal services and they say everything is functioning well.

This is my button composable:

Button(onClick = {
Log.i("PaymentExample", "price inside button = ${price}")
Log.i("PaymentExample"," selected product inside button = ${selectedProduct}")
val payment = PayPalPayment(
BigDecimal(price), // Amount
"USD", // Currency
paymentViewModel.getProductSelection(), // Item description
PayPalPayment.PAYMENT_INTENT_SALE // Payment intent
)

val intent = Intent(context, PaymentActivity::class.java).apply {
putExtra(PayPalService.EXTRA_PAYPAL_CONFIGURATION, payPalConfiguration)
putExtra(PaymentActivity.EXTRA_PAYMENT, payment)
}

// Launch the PayPal activity to initiate payment
paymentLauncher.launch(intent)
}) {
Text("Pay with PayPal")
}

This is my paypal configuration "

@Provides
@Singleton
fun providePayPalConfiguration(): PayPalConfiguration {
return PayPalConfiguration()
.environment(PayPalConfiguration.ENVIRONMENT_SANDBOX)
.clientId("My client Id")
}

Am i missing something important?

Login to Me Too
0 REPLIES 0

Haven't Found your Answer?

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