Reputation: 13555
Recently I have integrate the paypal to my android app using the library. It works fine and easy in android side. The only problem is that it need to provide the Client ID, and it needs to create a REST app at paypal developer console.
As the person request me to build the app has few knowledge about paypal, I would like to know are there any way to integrate the library so that the user can easier (e.g. without create app and get the cilent id? then he can just register the paypal account and give me the info)? Or the cilent id is the only way to integrate paypal in android?
The paypal usage is just one direct charge : allow using credit card / paypal account.
config = new PayPalConfiguration().environment(PayPalConfiguration.ENVIRONMENT_PRODUCTION).clientId(Constant.cilentID);
Intent intent = new Intent(ctx,PayPalService.class);
intent.putExtra(PayPalService.EXTRA_PAYPAL_CONFIGURATION,config);
ctx.startService(intent);
PayPalPayment payment = new PayPalPayment(
new BigDecimal(cost), "USD",
"Service Fee",
PayPalPayment.PAYMENT_INTENT_SALE);
Intent pay_intent = new Intent(ctx,
PaymentActivity.class);
pay_intent.putExtra(
PaymentActivity.EXTRA_PAYMENT,
payment);
((Activity) ctx).startActivityForResult(pay_intent, Constant.PAYPAL);
Sorry for newbie using Paypal library. Thanks for helping.
Upvotes: 0
Views: 58
Reputation: 1081
The client ID is going to be required for authentication. Your client would need to go to the developer portal and create the REST app to generate their credentials.
Upvotes: 1