Issues in PayPal live transaction via PayPal iOS SDK - ios

I am developing an iOS application for iPad, version 7.x. We Need to perform PayPal transaction via the application. We included PayPal iOS SDK and referring their sample code to perform the transaction.
The sample code is placed here
There are enough funds in the customer account
Also, we have proper Client ID and secret key where funds needs to be transferred.
Both payee and payer have live accounts.
Transaction via their Sandbox account was sucess
Upon debugging the code, we found that we are able to create the payment. However, we get error while the payment is about to be approved.
Here are the error details
PayPal SDK: Request has failed with error: UNKNOWN_ERROR - System error (UNKNOWN_ERROR). Please try again later. (400) | PayPal Debug-ID: 3e8087cbf6bd1 [live, PayPal iOS SDK 2.1.2]
Is there any specific configuration which we need to include in our code for making live transaction?
Or is there specific configuration that needs to be done, in one of the accounts?
Or is there something missing the sample code provided by PayPal iOS SDK? Please advice.

The issue is that you are not using the correct ClientID. The client ID you are using is not associated with an active App from yoiur developer portal. To correct this, please go into the developer portal and either use a different client ID from a different 'active' app or create a new app.

We discussed this issue with PayPal Technical Support team, and here was the FIX:
We’ve found the issue is actually not with buyer account, some flag was not updated for merchant account "XXX#YYY.com” due to a bug which had in our system at the time it was created.
The fastest workaround to resolve this would be if you could please add another email to same account "XXX#YYY.com”.
Steps to add another email address to "XXX#YYY.com” :
Please login to the PayPal account.
Click on Profile—> Email address. Add another email address.
This solved our issue.

Related

Paypal SDK Client ID

I'm confused about the Client ID I have to enter here. I found a few similar answers, but they are all old and don't answer my question.
So I have to enter my Client ID's here:
PayPalMobile.initializeWithClientIds(forEnvironments: [PayPalEnvironmentProduction: "HERE", PayPalEnvironmentSandbox: "HERE"])
But I don't know if I have to create REST API credentials or v.zero SDK credentials
I tried REST API first, but it didn't work.
And do I only need client ID's? So I don't have to enter the secrets to the email addresses anywhere?
All you need is to go to paypal developer account then
1- Go to Dashboard.
2- Create app.
3- you will find two tabs(sandbox and production) each one will give you an id to test on either modes.
you should also create testing accounts to make testing payments in sandbox mode
Here is a good documentation for Paypal mobile.

Paypal chained Payment Ios MPL Issue

Currently ios team is having an issue with chained payment in the app,the server team
needs an order id to be set as tracking id for tracking the payment.But ios team says
that they cant give a tracking id as there is no option to give tracking id in the sdk
mobile payment library.
Ios team says like after every chained payment transaction in the app
it generates a pay key after a succesful transaction and a coorelationId for a failed transaction
But it does not have a tracking id option.
Server team says like they cant implement
an ipn listener to update the db without the tracking id (Order Id).
I have been stuck with this issue for days can someone please help me out on this? It would be of great help
As said by your iOS team
Paypal MPL you will not get any ‘tracking id
‘ or some other information which you will get when integrate paypal
in the web.
every chained payment transaction in the app it generates a pay key
and payment status after a succesful transaction and a coorelationId
for a failed transaction
This is correct, i have also faced this issue as it only send paykey no other information
If you want to track for the any id you can send the paykey to the server and from the server they may call the API to get more information and tracking id which you may use,
for more information regarding this api refer this link: https://developer.paypal.com/docs/classic/api/adaptive-payments/PaymentDetails_API_Operation/ , check PaymentDetailsRequest which takes ‘payKey’ as mentioned in the step 3 in their doc
I Have managed to resolve the issue.For fetching the adaptive payment details,i am using the PaymentDetails API as mentioned by Pyro above.The only remaining issue was how will i track the transaction in the IPN listener .As of right now to my knowledge,IOS sdk doesn't offer a way to pass tracking Id ,so i exploited the memo field to pass in my id and i am able to retrieve this at my server side.I know this is a hack but am not left with much options.This link guided me to this workaround
https://github.com/paypal/PayPal-iOS-SDK/issues/67
If anyone knows a better way ,please do share.I hope this helps someone.

PayPal iOS SDK - Payment not available for apps with a Mobile SDK type of integration

I'm making and iPad app which uses the PayPal iOS SDK for payments. The problem is that I cannot Log in to PayPal from the app. I can only pay by credit card.
When you create an application on the PayPal developer page there is this message:
Important: Currently, Log in with PayPal is not available for apps with a Mobile SDK type of integration.
So my question are:
1.When will it be available?
2.If I publish my app now will it work when it will be available or I will need to update?
3.Why there is login button? It confuses the user. They have a button for login but they can only pay by credit card.
You can see the screen by clicking this link.
Thank you.
Josh from PayPal here. My apologies -- I think the messaging here could be improved.
Log In with PayPal is an oauth2 identity service, which you could use (say) to let users log in to your app using their PayPal account instead of having to create an account with your service.
The log in button you see in the PayPal Mobile SDKs, in contrast, is intended to let folks pay using their PayPal wallet, which does require that they log in. This does work, now, with a "Mobile SDK type of integration".
Hope that clears things up a bit.

Migration Questions from Paypal MPL to PaypalMobile iOS SDK

We are migrating from MPL to Paypal Mobile iOS SDK and we have what you call classic app. We could not find the migration guide and are having following questions.
The new sdk needs client id. Is the client id same as API Key?
According to the guide
"You need two credentials:
clientId: Available on the PayPal developer site.
receiverEmail: Your PayPal account email address
These are used to identify you as the recipient of payments. Both are public credentials; there is no need to attempt to obscure them or keep them private.
Important The receiverEmail should match the account used to get your client_id and secret."
We are not a receiver. We only facilitate payments between our users. Also we don't have a secret key. How do we let our users pay to other users?
In our app, user can pay their peers and also service providers. How do we make the distinction?
Your help is really appreciated!
Josh from PayPal here.
The PayPal iOS SDK does not currently have support for peer to peer payments.
The client_id is not the same as an API Key. You can get one from the PayPal developer website.
If you don't need support for direct credit card payments (sender has no PayPal account) you don't need the client_id. There is an option in the SDK to suppress direct credit card option. All you need to do is pass the payee's email address when initializing PaymentViewController. You can see the code snippet at https://developer.paypal.com/webapps/developer/docs/integration/mobile/ios-integration-guide/.

PayPal Mobile Payments, Logins, MPL and MEP files for iOS and PhoneGap

I'm trying to set up a mobile PayPal payment for gift cards in an iPhone app using the PhoneGap PayPal plugin but I'm hitting a brick wall:
I can launch a payment and get to the PayPal screen on the simulator but no combination of logins will work for me. I have verified these logins minutes earlier on the PayPal sandbox test site. I am using the sandbox App-ID and ENV_SANDBOX. I am also logged into my sandbox account on my Mac while doing this.
The log in XCode shows the payment message with all the correct price, items details, etc.
I have whitelisted th PayPal sites and I don't get whitelist messages in the log.
On my iPhone 4 with iOS 5.0 I cannot get to the PayPal screen. The log shows the "FILE SYSTEM CHECK ERROR" message. I have read elsewhere that this is to do with jailbroken phones but my phone is definitely not jailbroken.
I have tried just about every combination of ideas I can find but to no avail. So I have to ask:
Does the sandbox work OK for PayPal mobile payments? Has anyone got a successful login sequence?
The PhoneGap plugin uses a PayPal library file ending in "MEP" but the latest PayPal library uses an "MPL" suffix (or MEC for express checkout). Some of the function calls appear different between MEP and MPL as well. Is this a difference in versions and the PhoneGap plugin is just running an old version library? If so, is this likely to be a cause of issues?
I've only tried the MECL library at the moment, because our customer already had a working server backend.
Dunno if this can be of any use to you, but you may have a shot at https://github.com/azicchetti/MECLPayPalPlugin
Unfortunately it doesn't use the MPL library and you need some backend code to complete the express checkout flow. It works, though.
Cheers.
Have you created your fake accounts inside your sandbox?
The login when trying to test paying on the sandbox is NOT your paypal.com login, and is NOT your developer.paypal.com login.
Additionally, you must FIRST log into developer.paypal.com before your fake sandbox accounts will be recognized by the sandbox... This might be hard to do on a mobile device.

Resources