PayPal for Android won't switch to production

So, I have included paypal-android-sdk: 2.15.3 in my application and it works as expected in Sandbox. Now I want to go to production.

I switched the environment to PayPalConfiguration.ENVIRONMENT_PRODUCTION AND customer ID to production customer ID. What happens is that firstly, I cannot log in using my real PayPal account, and secondly, I see the blue Sandbox button, as shown below:

enter image description here

my code is:

PayPalConfiguration config = new PayPalConfiguration()
                .environment(CustomBuildConfig.PAY_PAL_CONFIG_ENVIRONMENT)
                .clientId(CustomBuildConfig.PAY_PAL_CONFIG_CLIENT_ID);

        PayPalPayment thingToBuy = new PayPalPayment(new BigDecimal(value), currency, item,
                PayPalPayment.PAYMENT_INTENT_SALE);
        Intent intent = new Intent(getContext(), PaymentActivity.class);
        intent.putExtra(PayPalService.EXTRA_PAYPAL_CONFIGURATION, config);
        intent.putExtra(PaymentActivity.EXTRA_PAYMENT, thingToBuy);
        startActivityForResult(intent, REQUEST_CODE_PAYPAL_PAYMENT);

Where:

PAY_PAL_CONFIG_ENVIRONMENT = PayPalConfiguration.ENVIRONMENT_PRODUCTION; PAY_PAL_CONFIG_CLIENT_ID = "production customer identifier";

Edit: The same work product id is already in use and works for the iOS client.

+4
2

"" - , , - PayPal. , , Sandbox .
, , .
: - Sandbox
: -

+2

Source: https://habr.com/ru/post/1682524/


All Articles