Search code examples
androidandroid-studiopaypal

how pass aplication_id parameter to paypal sdk in android?


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)