Adaptive Payments SDK - Magento Developers Paradise
-
Upload
paypal -
Category
Technology
-
view
3.008 -
download
2
description
Transcript of Adaptive Payments SDK - Magento Developers Paradise
ADAPTIVE PAYMENTS SDK
September 2012
Objective of this talk:
Introduction
Tim Messerschmidt • Mobile- & Web-Developer • Twitter-Enthusiast • Open source contributor • Developer Evangelist • Responsible for D/A/CH
Slides
bit.ly/QWTUw2
Question
Which PayPal products are already integrated in Magento?
Answer
1. Express Checkout 2. Website Payments • Standard • Pro
3. Payflow Pro Gateway
PayPal Payment solutions at Magento
Content of today’s talk
PayPal Adaptive Payments • Possible use cases
PHP Adaptive Payments SDK • Sample code!
Application Registration – x.com
Different permissions
Depending on the requests and level of information detail you need to request
permissions.
(Can be done in the developer console)
Adaptive Payments?
Simple API that allows you to do: • Simple payments (1:1) • Parallel payments (1:n) • Chained payments (1:1:n) • Instant • Delayed
Roles
Sender Receiver
API Caller
Payment
Simple payments
Parallel Payments
Interesting for: • Paying off a trip • A cart from different
merchants
Chained Payments
Interesting for: • Marketplaces
Facts: • Up to 5 receivers • Fees can be divided • Payments may be delayed (permission needed) • Money can be held up to 90 days
Nicety
Payments can be preapproved • Actual payment may be done later • Small changes to Pay API-Call • actionType = ‘CREATE’ • Returns a pay key
• Uses an additional API-Call • ExecutePayment • Checks payment status
Requests & Headers
Additional HTTP Headers are needed to do API calls Sandbox API credentials for the API Caller account X-PAYPAL-SECURITY-USERID : Sandbox-Caller-User-Id X-PAYPAL-SECURITY-PASSWORD : Sandbox-Caller-Password X-PAYPAL-SECURITY-SIGNATURE : Sandbox-Caller-Security-Signature Global Sandbox Application ID X-PAYPAL-APPLICATION-ID : Can be retrieved from x.com Input and output formats X-PAYPAL-REQUEST-DATA-FORMAT : JSON, NV or XML X-PAYPAL-RESPONSE-DATA-FORMAT : JSON, NV or XML
Adaptive Payments SDK
• SDK is available for: • C# • Java • PHP
• Supports different data formats: • NVP • SOAP • JSON
SDK-Download
http://bit.ly/S6WC2Q (PHP) or at
x.com/developers/paypal
Installation of the SDK
1. Copy the lib folder to your project’s source path 2. Change paypal_sdk_clientproperties.php • Can be found in lib/Config/
3. Change web_constants.php • Redirect urls • See samples/web/AdaptivePayments/
Example
Handle a parallel payment to multiple receivers in 3 easy steps
1. Initial setup
Uses predefined constants
2. Set the sender & receiver(s)
3. Finally pay
Response
The pay key can be used to obtain detailed information. It can be used as unique identifier.
Demo
Open Demo
Résumé
• Nice to build marketplaces • Enables processing more complex payments • Preapproval rocks! • Very convenient for digital goods: • Music • Videos • Games
PayPal troubleshooting
API documentation & guides: x.com/developers/paypal
Merchant technical service: paypal.com/mts
Personal contact
@SeraAndroid / @PayPalEuroDev
gplus.to/SeraAndroid
github.com/seraphimserapis
slideshare.net/PayPalEUDevs
QA
Questions?
Thanks!