0

I am writing a Flex project in which I need to communicate with Paypal via their APIs. Really not sure how to start with - this is my first flex/air application.

I won't be using any server side technology (no Java, Php, .NET, Coldfusion) - all of the requests have to come from Flex and the response be sent back directly to the flex application.

Can someone please give me an example or something to start with. Let's say implementation of RefundTransaction API

in Flex.

Is it possible? If not, then what layer do I need to add to the technology stack? Just need some pointers and I will pick it up from there.

Thanks

Rohan
  • 871
  • 1
  • 16
  • 32
  • Does the PayPal API URL that you're accessing have a crossdomain.xml file in place? If not; then a browser based Flex app will not be able to access their server; and you'll have to use some form of middleware (JAva/PHP/.NET/CF) to make it work. ( AIR will not have cross-domain restrictions). Beyond that; I would look into using an HTTPService to do this. Generally specific questions are favored on this site; so I voted to close as this is very generic. Tell us what you tried and what issues you had with it. – JeffryHouser May 10 '12 at 18:16
  • Thanks for a quick response. I can use AIR (browser based Flex app is not a compulsion). Just wanted head-up on it. Tried Googling a lot, couldn't find anything that would help. – Rohan May 10 '12 at 18:27
  • 1
    IF it's a SOAP API; look up docs on using WebServices in Flex. If it's a REST API look up docs on using HTTPService in Flex. Beyond that, you'll just need docs on the API. – JeffryHouser May 10 '12 at 18:35

1 Answers1

4

Definitely check out this article http://www.adobe.com/devnet/flex/articles/flex_paypal.html

Essentially will need to figure this out myself as well. One of the BIG, BIG, BIG (big enough for ya) keys is to NOT include your API key anywhere in the application (or other sensitive info). This is one of the pitfalls with using a JIT language because it's based on a VM it can't be hidden very effectively.

Mike Petty
  • 949
  • 6
  • 6