Skip to content

PratikSurela/PayPalSDKExample

Repository files navigation

PayPal SDK Example

This is a simple example of paypal integration in andorid using "easypaypal" module.

Step 1 : import module "easypaypal" into your project.

Step 2 : Declare and initialize "PayPalPaymentMain" class and than in onCreate() method

payPalPaymentMain = new PayPalPaymentMain(context, PayPalConfiguration.ENVIRONMENT_SANDBOX, getString(R.string.paypal_client_id));
payPalPaymentMain.onPayPalPayment(strProductPrice, "USD", strProductName, context);

Step 3: override "onActivityResult()" and do following 

payPalPaymentMain.setPaymentResponse(requestCode, resultCode, data);

Step 4 : implements "PayPalResult" interface into your activity/fragment and override method "onPayPalResult(PayPalResultData resultData)".

Step 5 : Use paypal details like

resultData.getPayPalAmount();

Use all the data like this and enjoy....:)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages