Shazron's PhoneGap Blog

at Adobe Systems Inc.

PayPal Plugin for PhoneGap iPhone

with 12 comments

First release of the PayPal Plugin for PhoneGap iPhone. Right now it handles static payments only (no dynamic changes to include shipping etc). Thanks to Chris Booth of Signature Digital in the UK for sponsoring development and also allowing it to be released to the PhoneGap community.

Nothing much to look at in the first screenshot, but with CSS styling and using PayPal’s official web button images it can look better. View the README and check out the sample app’s index.html for usage. Triggering the “Pay” button will launch the native workflow in the second screenshot.

NewImage.jpg

paypal_phonegap_plugin_2.jpg

 

Advertisement

Written by shazron

October 8, 2010 at 7:01 pm

Posted in phonegap

12 Responses

Subscribe to comments with RSS.

  1. When I build paypal plugin on phonegap to run on device, I get 4 errors and 4 warning.
    The first error,

    can’t find protocal declaration for PayPalMEPDelegate
    @interface SAiOSPaypalPlugin : PhoneGapCommand

    Expect ( and ) failure at
    - (void) paymentFailed:(PAYPAL_FAILURE)errorType

    can you tell me how to fix this isssue?

    sam

    November 11, 2010 at 10:39 am

    • Should be in one of the steps of the README, did you include the Paypal code?

      shazron

      November 26, 2010 at 3:36 am

  2. Now I got the code running but when I login to pay pay and make payment through sandbox, I got this error.

    I am using paypal phonegap pluging. When I make payment through paypal sandbox, I get error. “Payment is not complete. Add valid payment method for this amount on your computer”.

    What is the valid paypal payment method?
    Where do I add this valid payment method in the code of paypal phonegap plugin.

    sam

    November 26, 2010 at 11:06 am

  3. What does your .prepare(…) code look like? Take a look at the SAiOSPaypalPlugin.js file for the doc.

    shazron

    December 4, 2010 at 1:35 am

  4. My prepare code is similar to your example. Accept, I changed the env to sandbox. I run your sample code that come wtih the doc. I got the same error. I forward to PayPal and they don’t know what is wrong with it.

    Did you ever get it run with the paypal sandbox?

    sam

    December 4, 2010 at 1:46 am

  5. For sandbox to work you need to have sandbox test accounts, and change the code in my sample for the test accounts. Make sure you read everything here: https://www.x.com/docs/DOC-1379

    shazron

    December 4, 2010 at 1:58 am

  6. Yes, I do have sandbox test account. I did read your document. I try out your sample app by changing app_id from paypal. I also use my test account that I created from the sandbox.

    That is the reason I found out that your sample does not work. It does not the send the transaction to sandbox.

    sam

    December 4, 2010 at 11:55 am

    • if you send me your sandbox test account credentials privately, I can debug this when I have some free time later today (hopefully), send to shazron at nitobi.com

      shazron

      December 6, 2010 at 8:14 am

  7. Hey, that’s great. I was desperately looking for a phonegap paypal plugin. Are there any plans to develope a phonegap paypal plugin for other platforms than iOS? (e.g.: Android and Blackberry)

    christian

    February 21, 2011 at 4:29 pm

  8. It is interesting. Is there any detail implementation docs?
    I have tried integration but seems that it is only dummy account. How can I change it into live? In the SAiOSPaypalPlugin.m, by default, it is set to ENV_NONE. I can’t try it with ENV_SANDBOX or ENV_LIVE.

    Any hints?

    Howard

    March 20, 2011 at 9:22 am

  9. I get this …
    ERROR: Plugin ‘SAiOSPaypalPlugin’ not found, or is not a PGPlugin. Check your plugin mapping in PhoneGap.plist.

    How to solve this..I am new to PhoneGap..guide me..

    Dinesh

    October 21, 2011 at 1:26 pm

  10. It is good. Now paypal give more tools and flexibility to build it in many type of phones.

    Tim-on Web

    November 17, 2011 at 2:17 am


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.