Page 6 of 7
Paypal issues
Posted: Fri Apr 24, 2015 6:19 am
by Bruce Stuart
Also - some of you are interested in being able to add item detail to the Payment request - in order to add 1 or more items to the PayPalPayment manifest - and - it does look cleaner and more professional to the buyer.
Here's a quick tutorial to add items to your payPal Manifest:(be SURE TO BACKUP your project before you make significant changes like this - just in case):
First - Change your PayPalPayment Service (that's what I called it in the original tutorial above). Here's how you adapt what you already have - into what's required....Remember - you are changing the "REQUEST" tab (not the response please).
2.Next - Map data into the new fields on the request. In this example - I'm adding only 1 item to the Payment Request (you can obviously have multiple items - but you would ADD those to an array of items - prior to execution of this mapping - and do that in Javascript - examples, sample code, etc. - upon request .... again that's a bit more significant piece of work - and it requires some coaching from me that I cannot deliver here in this post. You're up to it though I know it!!!)
Here's an example mapping for a single item (to the new fields in the request):
And Viola!!! PayPal responds by showing you the list of items on the left side of their Payment UI :
Questions - comments - contact me at the email address found on my profile.
Best,
Bruce
Paypal issues
Posted: Fri Apr 24, 2015 6:21 am
by Bruce Stuart
oh - and remember - none of this is rocket science.... I'm just developing the request by following along the documentation found on the PayPal developer - API Reference.
You can find that reference here - and make changes to any of your request - responses - by following the reference guide..... easy peasy....!!!
https://developer.paypal.com/webapps/...
Paypal issues
Posted: Fri Apr 24, 2015 8:33 am
by Alena Prykhodko
Hello,
We have published Using PayPal API plugin tutorial, you can find it here https://devcenter.appery.io/documenta...
Paypal issues
Posted: Wed Apr 29, 2015 10:39 pm
by Bruce Stuart
for anyone that continues to follow this thread - and has created a service as I chose to above - with the name "PayPalGetToken" - please change the name of this service to Pay_Pal_Make_Key - GetToken appears to be a reserved word somewhere (Chrome for Windows for sure) and on other platforms.
It caused me a few headaches (errors I could not make sense of or debug) when I was publishing my site where I used this service with this name.
Best,
Bruce
Paypal issues
Posted: Thu Apr 30, 2015 9:59 pm
by Kat Gutierrez
Hello Bruce, if you get a chance, I sent you an e-mail this morning. I of course have run into some problems.
Paypal issues
Posted: Fri May 01, 2015 12:31 am
by Bruce Stuart
Paypal issues
Posted: Tue May 19, 2015 9:08 am
by BRENT JOYCE
Hi Bruce, the PayPal integration works fine for me in the Appery test environment. However it fails on the phone at the approvement stage; i.e. when the return url is called from PayPal. I don't receive details of the payment. Any ideas what the issue could be?
Paypal issues
Posted: Tue May 19, 2015 10:19 am
by Bruce Stuart
Yes .... On browsers other than the desktop ... PayPal wipes out local storage so you can't execute your saved transaction information.
Save it to a collection data store prior to calling paypal and then know I the way back you've got to start all over again with your local storage. ( read it from the collection ... Log in again etc.)
Paypal issues
Posted: Fri May 22, 2015 7:41 am
by BRENT JOYCE
Hi Bruce, on the phone its alll of a sudden going back to the appery page when the payment is approved this doesn't happen in the browser. Any idea why this is happening?
Paypal issues
Posted: Fri May 22, 2015 11:15 am
by Bruce Stuart
Yes - exactly what I stated - when you go to the PayPal website from your inApp browser - PayPal does you the 'favor' of clearing all of your localStorage.
When you come back from PayPal then - you will find that your event to 'process the payment' fails - and unless you have error handling in the event to display the error - it will take you back to the Appery page.
I can help with the issue (i've written code around it) . Bottom line there are two solutions:
Implement the solution I refer to above - save all of your important memvars before calling payPal website and then upcoming coming back from PayPal - you need to login again, and read back restore the memvars - all before processing the paypal payment. This can be a real pain in the keester ... however, I have it working in an instance that I have and one for a client (a member of the forum here). unfortunately at this time - I don't have the cycles to post it here as I'm working another project for another member as well as a full time gig.
You can collect credit card details on your side --- and then call the PayPal API using the credit card details already collected. I have not done that yet - but that's the path I recommend going down long term. It's better for the users (you don't leave your app which users hate) - and you get a response without having to leave the app. However, this is undocumented ground here on this forum - and will take some technical chops to pull off and there is a separate payPal approval process for this ---- its reasonably light weight - and you generally get approved in a couple of days.
You might want to look at the other plugin - Stripe - I believe appery just did a tutorial on it...
Best,
Bruce