Saverio Terracciano
Saverio Terracciano

Reputation: 3915

What to use to make a Paypal Payment in Windows Phone 8.1

I need to make a simple paypal payment from my Windows Phone app. I used to use PayPal's Windows 8 SDK, but it has been discontinued so I can't even get the old SDK from the official github page (http://paypal.github.io/Windows8SDK/).

The other options seems to require an integration on a web page. I've tried looking at similar questions on S.O. but they're either outdated, or where before / while there still was the Windows 8 SDK, so they're not valid anymore.

Upon further inspection, it would seem the SOAP API don't work because importing them won't generate PayPalAPIAASoapBinding(same behaviour as a Console application, which I fixed importing an old Web Reference, which is not possible on WP) and REST APIs rely on Paypal nuGet package which can't be used in Windows Phone (https://developer.paypal.com/docs/api/).

I am currently at a loss for options (Except to set up an external website to do the job).

Upvotes: 1

Views: 347

Answers (2)

Saverio Terracciano
Saverio Terracciano

Reputation: 3915

Having faced all the aforementioned problems (I still don't know why Paypal pulled the plug for Windows Phone support), I found a workaround.

  • I generated a Paypal Buy Now button (https://www.paypal.com/uk/webapps/mpp/get-started-payment-buttons), the unencrypted & non account saved version.
  • I copied the code in an html file within my app and used some markers on the hidden fields that interested me (description of the product, amount, shipping costs, etc.).
  • From my previous page the user will select the product details he wants to purchase, such details will be passed to another page in which I have among other things a WebBrowser control.
  • I will replace the markers with the details passed from the previous page and load the html in the WebBrowser.
  • The user can then proceed with the purchase.

I am considering about making this into an open source plugin / library to make things easier for the fellow developers hit by my same issue, will update this with the link if I find the time to do so.

Upvotes: 2

pp_pduan
pp_pduan

Reputation: 3402

Unfortunately with PayPal discontinuing the WIN8 SDK, the only available solution as of now is to setup a website integration, and embedding the page with your webbrowser kit in your WIN8 APP.

Just so you know the existing WIN SDK API integration is still being supported, you may refer here for a backup git of the WIN8 SDK library.

Upvotes: 1

Related Questions