how pass aplication_id parameter to paypal sdk in android?

Issue

i´m reading the documentation of paypal https://developer.paypal.com/limited-release/paypal-mobile-checkout/android/ ,in the example show
enter image description here

but i have the next error, the parameters doesn´t match. Only works when i remove this parameter
BuildConfig.APPLICATION_ID + "://paypalpay", how i can pass the parameter even later?
enter image description here

Solution

   config= PayPalConfiguration().environment(PayPalConfiguration.ENVIRONMENT_SANDBOX).clientId(client_id)
        .environment(CONFIG_ENVIRONMENT)
        .merchantName("Example Merchant")
        .merchantPrivacyPolicyUri(Uri.parse("https://www.example.com/privacy"))
        .merchantUserAgreementUri(Uri.parse("https://www.example.com/legal"))
    var i= Intent(this, PayPalService::class.java)
    i.putExtra(PayPalService.EXTRA_PAYPAL_CONFIGURATION,config)
    startService(i)

Answered By – Amrita

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply

(*) Required, Your email will not be published