In this post we will learn how to integrate paypal payment in your android application. In this Android Paypal Integration Tutorial we will be using the official SDK provided by paypal.
Now days a payment option is very much essential for many apps if you are selling something through your apps. And PayPal is one of the major payment method used worldwide.
Thats why I thought about posting this Android PayPal Integration Tutorial. So lets begin.
Table of Contents
Android Paypal Integration Tutorial Video Demo
You can checkout this video before moving on to the tutorial to know what actually we will be creating.
Android Paypal Integration Tutorial
Creating Paypal Sandbox Account
Now it is very obvious that you will not be testing your payment with actual money. And that is why paypal has given a sandbox feature. You can create sandbox accounts to test payments. So in the first phase of this Android Paypal Integration Tutorial we will create two sandbox accounts. One personal account from where you pay, and one Business Account where you will receive the paid amount. So lets begin.
- Go to this link and login with your paypal account.
- Fill the form to create account. Remember you need to create two accounts. For first account select Account Type to Personal and for Other select Account Type to Business.
Creating Paypal REST API App
- Now go to this link to create a paypal app.
- Put your app name and click on Create App.
- Now you will see your Client ID. Copy it some where. Thats all for the Paypal Side. Now we will move to Android Project.
Creating Android Project
Adding PayPal Client ID
- Create a new Android Project. I created PayPalIntegration.
- In your package create a class named PayPalConfig.java and write the following code.
1 2 3 4 5 6 7 8 9 10 11 12 | package net.simplifiedcoding.paypalintegration; /** * Created by Belal on 5/1/2016. */ public class PayPalConfig { public static final String PAYPAL_CLIENT_ID = "YOUR PAYPAL CLIENT ID"; } |
- In the above code you have to put your paypal client id. Now we need to add PayPal SDK to our project.
Adding PayPal SDK
- We are using Android Studio so go inside your app level build.gradle file. (Someone said that he doesn’t understand app level build.gradle) So I am posting the screenshot. The highlighted one is app level build.gradle file and above that you have the project level build.gradle file. You need to open the app level build.gradle file.
- Inside the app level build.gradle file you will see dependencies block. Inside that you need to add your paypal sdk. So add the following code.
1 2 3 4 5 6 7 8 9 10 | dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) testCompile 'junit:junit:4.12' compile 'com.android.support:appcompat-v7:23.3.0' //You have to add this line compile 'com.paypal.sdk:paypal-android-sdk:2.14.2' } |
- Now sync your project and your done.
Integrating Paypal Payment
- As this is a sample demonstrating only paypal payment. I will not give a real world demo. Instead I am creating a simple EditText where you can put the payment amount to pay. So come inside your acitivity_main.xml and write the following code.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 | <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:paddingBottom="@dimen/activity_vertical_margin" android:paddingLeft="@dimen/activity_horizontal_margin" android:paddingRight="@dimen/activity_horizontal_margin" android:paddingTop="@dimen/activity_vertical_margin" tools:context="net.simplifiedcoding.paypalintegration.MainActivity"> <LinearLayout android:id="@+id/linearLayout" android:orientation="vertical" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_alignParentLeft="true" android:layout_alignParentStart="true" android:layout_centerVertical="true"> <TextView android:layout_width="match_parent" android:layout_height="wrap_content" android:text="Enter Amount" android:textAlignment="center" /> <EditText android:id="@+id/editTextAmount" android:layout_width="match_parent" android:layout_height="wrap_content" android:textAlignment="center" /> <Button android:id="@+id/buttonPay" android:text="Pay Now" android:layout_width="match_parent" android:layout_height="wrap_content" /> </LinearLayout> </RelativeLayout> |
- You will get the following UI with the above given code.
- Now come inside MainActivity.java and declare objects for your views and add listener to the button.
1 2 3 4 5 6 7 8 9 10 11 | //Implementing click listener to our class public class MainActivity extends AppCompatActivity implements View.OnClickListener { //The views private Button buttonPay; private EditText editTextAmount; //Payment Amount private String paymentAmount; |
- Inside onCreate() initialize the views and add listener to the buttons.
1 2 3 4 5 6 7 8 9 10 11 12 | @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); buttonPay = (Button) findViewById(R.id.buttonPay); editTextAmount = (EditText) findViewById(R.id.editTextAmount); buttonPay.setOnClickListener(this); } |
- Now create a method named getPayment() and call it on button click.
1 2 3 4 5 6 | @Override public void onClick(View v) { getPayment(); } |
- Now to get Payment from PayPal we need a PayPal Configuration Object and a Request Code.
1 2 3 4 5 6 7 8 9 10 11 12 | //Paypal intent request code to track onActivityResult method public static final int PAYPAL_REQUEST_CODE = 123; //Paypal Configuration Object private static PayPalConfiguration config = new PayPalConfiguration() // Start with mock environment. When ready, switch to sandbox (ENVIRONMENT_SANDBOX) // or live (ENVIRONMENT_PRODUCTION) .environment(PayPalConfiguration.ENVIRONMENT_SANDBOX) .clientId(PayPalConfig.PAYPAL_CLIENT_ID) |
- Inside onCreate() method we need to start PayPalService.
1 2 3 4 5 6 7 | Intent intent = new Intent(this, PayPalService.class); intent.putExtra(PayPalService.EXTRA_PAYPAL_CONFIGURATION, config); startService(intent); |
- We should destroy the service when app closes.
1 2 3 4 5 6 7 | @Override public void onDestroy() { stopService(new Intent(this, PayPalService.class)); super.onDestroy(); } |
- Now complete the method getPayment() with the following code.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | private void getPayment() { //Getting the amount from editText paymentAmount = editTextAmount.getText().toString(); //Creating a paypalpayment PayPalPayment payment = new PayPalPayment(new BigDecimal(String.valueOf(paymentAmount)), "USD", "Simplified Coding Fee", PayPalPayment.PAYMENT_INTENT_SALE); //Creating Paypal Payment activity intent Intent intent = new Intent(this, PaymentActivity.class); //putting the paypal configuration to the intent intent.putExtra(PayPalService.EXTRA_PAYPAL_CONFIGURATION, config); //Puting paypal payment to the intent intent.putExtra(PaymentActivity.EXTRA_PAYMENT, payment); //Starting the intent activity for result //the request code will be used on the method onActivityResult startActivityForResult(intent, PAYPAL_REQUEST_CODE); } |
- The above method will invoke the onActivityResult() method after completion. So override onActivityResult() and write the following code.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | @Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { //If the result is from paypal if (requestCode == PAYPAL_REQUEST_CODE) { //If the result is OK i.e. user has not canceled the payment if (resultCode == Activity.RESULT_OK) { //Getting the payment confirmation PaymentConfirmation confirm = data.getParcelableExtra(PaymentActivity.EXTRA_RESULT_CONFIRMATION); //if confirmation is not null if (confirm != null) { try { //Getting the payment details String paymentDetails = confirm.toJSONObject().toString(4); Log.i("paymentExample", paymentDetails); //Starting a new activity for the payment details and also putting the payment details with intent startActivity(new Intent(this, ConfirmationActivity.class) .putExtra("PaymentDetails", paymentDetails) .putExtra("PaymentAmount", paymentAmount)); } catch (JSONException e) { Log.e("paymentExample", "an extremely unlikely failure occurred: ", e); } } } else if (resultCode == Activity.RESULT_CANCELED) { Log.i("paymentExample", "The user canceled."); } else if (resultCode == PaymentActivity.RESULT_EXTRAS_INVALID) { Log.i("paymentExample", "An invalid Payment or PayPalConfiguration was submitted. Please see the docs."); } } } |
- In the above code you can see the string paymentDetails. It is in json format as follows. It contains the payment detail with a unique payment id.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | { "client": { "environment": "sandbox", "paypal_sdk_version": "2.0.0", "platform": "iOS", "product_name": "PayPal iOS SDK;" }, "response": { "create_time": "2014-02-12T22:29:49Z", "id": "PAY-564191241M8701234KL57LXI", "intent": "sale", "state": "approved" }, "response_type": "payment" } |
- In this post I am not covering the verification process. As you need to verify the payment at your server with the payment id you are seeing in the above json.
You need to store the unique id at your server after the verification. In the next part we will cover the verification process at the server.
In this tutorial we will show these details to another activity. - Now we will create another activity where we will show the payment details. So create a new empty activity I created ConfirmationActivity.java. And inside layout file for this activity write the following xml code.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 | <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:paddingBottom="@dimen/activity_vertical_margin" android:paddingLeft="@dimen/activity_horizontal_margin" android:paddingRight="@dimen/activity_horizontal_margin" android:paddingTop="@dimen/activity_vertical_margin" tools:context="net.simplifiedcoding.paypalintegration.ConfirmationActivity"> <TableLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_centerVertical="true" android:layout_alignParentLeft="true" android:layout_alignParentStart="true"> <TableRow> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Payment Amount : " /> <TextView android:id="@+id/paymentAmount" android:layout_width="wrap_content" android:textStyle="bold" android:layout_height="wrap_content" /> </TableRow> <TableRow> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Status : " /> <TextView android:id="@+id/paymentStatus" android:layout_width="wrap_content" android:textStyle="bold" android:layout_height="wrap_content" /> </TableRow> <TableRow> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Payment Id : " /> <TextView android:id="@+id/paymentId" android:textStyle="bold" android:layout_width="wrap_content" android:layout_height="wrap_content" /> </TableRow> </TableLayout> </RelativeLayout> |
- Now in the java file which is ConfirmationActivity.java write the following code.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 | package net.simplifiedcoding.paypalintegration; import android.content.Intent; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.widget.TextView; import android.widget.Toast; import org.json.JSONException; import org.json.JSONObject; public class ConfirmationActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_confirmation); //Getting Intent Intent intent = getIntent(); try { JSONObject jsonDetails = new JSONObject(intent.getStringExtra("PaymentDetails")); //Displaying payment details showDetails(jsonDetails.getJSONObject("response"), intent.getStringExtra("PaymentAmount")); } catch (JSONException e) { Toast.makeText(this, e.getMessage(), Toast.LENGTH_SHORT).show(); } } private void showDetails(JSONObject jsonDetails, String paymentAmount) throws JSONException { //Views TextView textViewId = (TextView) findViewById(R.id.paymentId); TextView textViewStatus= (TextView) findViewById(R.id.paymentStatus); TextView textViewAmount = (TextView) findViewById(R.id.paymentAmount); //Showing the details from json object textViewId.setText(jsonDetails.getString("id")); textViewStatus.setText(jsonDetails.getString("state")); textViewAmount.setText(paymentAmount+" USD"); } } |
- Thats it now just run your application and you will get the following output.
- If you are seeing the status as approved you can verity the payment at your sandbox paypal account.
- Bingo! it is working absolutely fine. You can download my source code from GitHub. Just go to the link given below.
So thats all for this Android Paypal Integration Tutorial friends. Feel free to leave your comments if having any troubles regarding this Android PayPal Integration Tutorial. Thank You 🙂

Hi, my name is Belal Khan and I am a Google Developers Expert (GDE) for Android. The passion of teaching made me create this blog. If you are an Android Developer, or you are learning about Android Development, then I can help you a lot with Simplified Coding.
thank you so much belal
belal how would we use CCAvenue or master card etc
Belal it would be better if u do Payment Gateway to Access Internet and Credit card Transactions!!!
🙂
hi belal
i am having a doubt executed this tutorial
how is payment done without even using internet permision in manifest file
You don’t need internet permission because the app is opening the paypal activity on another intent.. so basically its not your activity using the internet.. thats why no internet permission is needed
i have followed your post but facing the same error again and again
Unable to start service com.paypal.android.sdk.payments.PayPalService@10f7da8 with Intent { cmp=com.example.chattonee/com.paypal.android.sdk.payments.PayPalService (has extras) }: java.lang.RuntimeException: Service extras invalid. Please check the docs.
deprecated for Turkey
Hi, how can i set the product detail to be sold? and how can i get these after transaction is done? thanks in advance…
hey Mr belal : i am just want to sent my amount that i entered from my paypal account to anther paypal account ?? please iam waiting ur reply and thnQ
Use Google wallet not Paypal.
Hi Bilal,
I need some help from you. I have implemented PayPal in my app and now the size of apk extend to 14 MB.
Then i have found a solution to reduce PayPal sdk size and it reduce up 4.5 MB by removing io.card group
compile(‘com.paypal.sdk:paypal-android-sdk:2.14.1’) {
exclude group: ‘io.card’
}
I need to know, Is not there any problem with payment.
Plz let me know quickly.
nasiralityagi@gmail.com
Your blogs i Just loved it lot to learn….Thanks for ur efforts
My login is showing invalid emaid-id/password when i am trying to login in the app.I have made an account with that email id in paypal.
Same problem for me also plz tell me what i will do. Thanks in andvance
can’t we do it without a sandbox account, I mean an original paypal normal account
{
“response”: {
“state”: “approved”,
“id”: “PAY-2WT82232DX478993NK7DNMLA”,
“create_time”: “2016-08-31T13:06:09Z”,
“authorization_id”: “70E40512SC428823W”,
“intent”: “authorize”
},
“client”: {
“platform”: “Android”,
“paypal_sdk_version”: “2.14.2”,
“product_name”: “PayPal-Android-SDK”,
“environment”: “sandbox”
},
“response_type”: “payment”
}
My transaction are not show plz help me
i have a problem mr. belal khan please help me..
09-20 15:20:34.503 29662-30725/com.dani.skripsi.paypal_integration E/paypal.sdk: request failure with http statusCode:422,exception:Unprocessable Entity
09-20 15:20:34.505 29662-30725/com.dani.skripsi.paypal_integration E/paypal.sdk: request failed with server response:{“name”:”PAYMENT_CREATION_ERROR”,”debug_id”:”d8deb29c21fba”,”message”:”checkout-session not created”,”information_link”:”https://developer.paypal.com/docs/api/#PAYMENT_CREATION_ERROR”}
09-20 15:20:34.507 29662-29662/com.dani.skripsi.paypal_integration E/paypal.sdk: PAYMENT_CREATION_ERROR
can’t show sandbox transaction on Paypal dashboard ?
Me neither! the app shows the APPROVED status, but I can’t see the transaction on the web. Why is this?
how can show table on transaction on bottom of your tutorial ?
you must log in with your BUSSINESS SANDBOX account in https://www.sandbox.paypal.com/, I discovered recently
android {
dexOptions {
jumboMode true
}
}
use the above if you got the following error
Information:Gradle tasks [:app:assembleDebug]
Error:Error converting bytecode to dex:
Cause: com.android.dex.DexIndexOverflowException: Cannot merge new index 67062 into a non-jumbo instruction!
Error:Execution failed for task ‘:app:transformClassesWithDexForDebug’.
> com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process ‘command ‘/usr/lib/jvm/java-8-oracle/bin/java” finished with non-zero exit value 2
Information:BUILD FAILED
Information:Total time: 34.777 secs
Error:AGPBI: {“kind”:”error”,”text”:”Error converting bytecode to dex:\nCause: com.android.dex.DexIndexOverflowException: Cannot merge new index 67062 into a non-jumbo instruction!”,”sources”:[{}],”original”:”UNEXPECTED TOP-LEVEL EXCEPTION:\ncom.android.dex.DexIndexOverflowException: Cannot merge new index 67062 into a non-jumbo instruction!\n\tat com.android.dx.merge.InstructionTransformer.jumboCheck(InstructionTransformer.java:111)\n\tat com.android.dx.merge.InstructionTransformer.access$800(InstructionTransformer.java:26)\n\tat com.android.dx.merge.InstructionTransformer$StringVisitor.visit(InstructionTransformer.java:74)\n\tat com.android.dx.io.CodeReader.callVisit(CodeReader.java:114)\n\tat com.android.dx.io.CodeReader.visitAll(CodeReader.java:89)\n\tat com.android.dx.merge.InstructionTransformer.transform(InstructionTransformer.java:50)\n\tat com.android.dx.merge.DexMerger.transformCode(DexMerger.java:837)\n\tat com.android.dx.merge.DexMerger.transformMethods(DexMerger.java:811)\n\tat com.android.dx.merge.DexMerger.transformClassData(DexMerger.java:783)\n\tat com.android.dx.merge.DexMerger.transformClassDef(DexMerger.java:680)\n\tat com.android.dx.merge.DexMerger.mergeClassDefs(DexMerger.java:534)\n\tat com.android.dx.merge.DexMerger.mergeDexes(DexMerger.java:164)\n\tat com.android.dx.merge.DexMerger.merge(DexMerger.java:188)\n\tat com.android.dx.command.dexer.Main.mergeLibraryDexBuffers(Main.java:504)\n\tat com.android.dx.command.dexer.Main.runMonoDex(Main.java:334)\n\tat com.android.dx.command.dexer.Main.run(Main.java:277)\n\tat com.android.dx.command.dexer.Main.main(Main.java:245)\n\tat com.android.dx.command.Main.main(Main.java:106)\n”,”tool”:”Dex”}
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ‘:app:transformClassesWithDexForDebug’.
> com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process ‘command ‘/usr/lib/jvm/java-8-oracle/bin/java” finished with non-zero exit value 2
* Try:
Run with –stacktrace option to get the stack trace. Run with –info or –debug option to get more log output.
Information:3 errors
Information:0 warnings
Information:See complete output in console
hi belal,
please help me how do I implement for a real account …
Hi,
Awesome tutorial.
Now I wants to get user email and name in ActivityResult. How to make it possible?
Thanks.
hi
please tell me how to live this .
Hi Belal Khan,
First of all thanks for the tutorial. Can you make another tutorial on verifying the payment using the “payment id” and “status” that we get from the payment confirmation object?
hi,
now explain.can you please explain how to get the values like this”
mTransactionStatus=success,
mAddress=Coimbatore,
mTransactionid=PAY-15144772AT147493HLACGQNA,
mAmount=85.0,
mDate=2016-10-17T05: 57: 08Z,
mCurrencyType=USD,
thank you.
You will get most of these details from “PaymentConfirmation” object which is “confirm” in our case. You can find PaymentConfirmation in the onActivityResuly method
Can You Please Post Project For CCAvenue Payment Gateway Integration
Paypal-sdk:SERVER_COMMUNICATION_ERROR is coming and a dialog appears with a message there was a problem with paypal servers.
Nice tutorial and waiting for verification process in server tutorial.
Sir , please tell how to connect wallet with this system.
Hi Belal
let me Help..?? Where can i see transaction History in Sandbox Transactions
where is the second part of this tutorial. ” In the next part we will cover the verification process at the server.”
Do i need to give my credit card details for creating account in paypal. I have created an account in paypal without giving credit card details. When i login from App, i’m getting the following message.
“There was a problem setting up this payment – account needs a valid funding source, such as a bank or payment card. Please visit the paypal website to check your account.”
I thought that i can test the app with sandbox feature without providing credit card details. Can you clarify on this
Hi Belal,
Good explanation but I need recurring payment with paypal in android. how can i do?
Thank you……..Nice Tutorial.It helps me a lot.
Hey thank u for the amazing code,could u please upload the verification part of this tutorial ?
Thank u in advance…
Amazing tutorial…
E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.example.user.paypalintegration, PID: 2521
java.lang.RuntimeException: Unable to start service com.paypal.android.sdk.payments.PayPalService@79d55d7 with Intent { cmp=com.example.user.paypalintegration/com.paypal.android.sdk.payments.PayPalService (has extras) }: java.lang.RuntimeException: Service extras invalid. Please check the docs.
at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:3314)
at android.app.ActivityThread.-wrap21(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1565)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6077)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:865)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:755)
Caused by: java.lang.RuntimeException: Service extras invalid. Please check the docs.
at com.paypal.android.sdk.payments.PayPalService.a(Unknown Source)
at com.paypal.android.sdk.payments.PayPalService.onStartCommand(Unknown Source)
at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:3297)
at android.app.ActivityThread.-wrap21(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1565)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6077)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:865)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:755)
Do u know how to solve it? about java.lang.RuntimeException: Service extras invalid. Please check the docs.
You are providing wrong Clientid. Recheck again.
my app is working fine but in dashboard pf paytm no transaction history is shown is shown like in yours please help me in this.
Where should I put the json file? I don’t know where to put this:
{
“client”: {
“environment”: “sandbox”,
“paypal_sdk_version”: “2.0.0”,
“platform”: “iOS”,
“product_name”: “PayPal iOS SDK;”
},
“response”: {
“create_time”: “2014-02-12T22:29:49Z”,
“id”: “PAY-564191241M8701234KL57LXI”,
“intent”: “sale”,
“state”: “approved”
},
“response_type”: “payment”
}
Thanks in advance!
Thank you so much Sir for this BIG help. 🙂
Thank you so much for explaining clearly, Bt can u tell me how to fetch the successful transaction id,and amount and store in the database
hi
first of all , thanks for ur great job 😉
i have an error on getPayment() fct :
payment = new PayPalPayment(new BigDecimal(String.valueOf(paymentAmount)), “USD”, “Simplified Coding Fee”,
PAYMENT_INTENT_SALE);
it doesnt work and the compiler give me a mistake. I try to ad if(VERSION.SDK…) or Add @>TargetApi(N)annotation without sucess
can u help me please…
how to unlock the source code link???
Hi,
great tutorial thank you it helped me very well to start with. Is it possible to make a tutorial on Paypal Adaptive Payments with multiple payment receiver’s on Android? Would be interesting on how to split payments :)…
Regards
Hello, how can I send the payment to multiple receivers? Thank you.
Hi! This may sound stupid, but how do i implement the verification process? Can someone help me?
Hello bela sir u r great teacher you should make tutorial on payment getway just like instamojo pay u money ect its realy help us to make great aaps
did you published the “covering the verification process” ?
This is the json response I am getting from it:
{“name”:”UNSUPPORTED_PAYEE_CURRENCY”,”debug_id”:”5236e2cc57b5b”,”message”:”The currency is not accepted by payee.”,”information_link”:”https://developer.paypal.com/docs/api/#UNSUPPORTED_PAYEE_CURRENCY”}
Hi Belal,
Thanks for this. Can you provide any tutorial on Ola/Uber integration API into my own app ? It will be very useful for freshers like me. Thanks in advance to anyone for this help.
where is the second part of this code??
hey sir my App is working fine……but in business account money is added but the total balance is not increasing….please help me in this
after I click pay now button it shows an error “There was a problem setting up this payment. Please visit PayPal website to check your account”. How do I resolve this? please reply. thank you in advance.
I am getting the same error. Did u find any solution?
i am facing same problem as well.. please some PROs help us…
Hi, I follow your tutorial for paypal integation in my application. It work fine. But there is one query if you can help me. You show tutorial for USD payment. But i want to use INR. If i used USD then it work fine, but if i use INR than it have not respond. Can you please me related this issue. I show the code i used.
PayPalPayment payment = new PayPalPayment(new BigDecimal(String.valueOf(totalPrice)),
“INR”, title, PayPalPayment.PAYMENT_INTENT_SALE);
Intent intent = new Intent(this, PaymentActivity.class);
intent.putExtra(PayPalService.EXTRA_PAYPAL_CONFIGURATION, configuration);
intent.putExtra(PaymentActivity.EXTRA_PAYMENT, payment);
startActivityForResult(intent, PAYPAL_REQUEST_CODE);
Thank you so much Bilal… it was very good tutorial for naive developer like me and very self explanatory. As in the above tutorial you said that we need to verify the payment at our server, can you please provide the link to your next tutorial for this verification .
Hi…
I had integrate paypal.but am unable to login in that.getting ( system error .please try again late ) message.
using 2.16.0 paypal version
Can please help me in that