adaptive payments sdk - magento developers paradise

31
ADAPTIVE PAYMENTS SDK September 2012

Upload: paypal

Post on 29-Nov-2014

3.009 views

Category:

Technology


2 download

DESCRIPTION

This talk was held during the Magento Developers Paradise 2012. It describes the possibilities of PayPal's Adaptive Payments and how to use them in combination with Magento.

TRANSCRIPT

Page 1: Adaptive Payments SDK - Magento Developers Paradise

ADAPTIVE PAYMENTS SDK

September 2012

Page 2: Adaptive Payments SDK - Magento Developers Paradise

Objective of this talk:

Page 3: Adaptive Payments SDK - Magento Developers Paradise

Introduction

Tim Messerschmidt •  Mobile- & Web-Developer •  Twitter-Enthusiast •  Open source contributor •  Developer Evangelist •  Responsible for D/A/CH

Page 4: Adaptive Payments SDK - Magento Developers Paradise

Slides

bit.ly/QWTUw2

Page 5: Adaptive Payments SDK - Magento Developers Paradise

Question

Which PayPal products are already integrated in Magento?

Page 6: Adaptive Payments SDK - Magento Developers Paradise

Answer

1.  Express Checkout 2.  Website Payments •  Standard •  Pro

3. Payflow Pro Gateway

Page 7: Adaptive Payments SDK - Magento Developers Paradise

PayPal Payment solutions at Magento

Page 8: Adaptive Payments SDK - Magento Developers Paradise

Content of today’s talk

PayPal Adaptive Payments •  Possible use cases

PHP Adaptive Payments SDK •  Sample code!

Page 9: Adaptive Payments SDK - Magento Developers Paradise

Application Registration – x.com

Page 10: Adaptive Payments SDK - Magento Developers Paradise

Different permissions

Depending on the requests and level of information detail you need to request

permissions.

(Can be done in the developer console)

Page 11: Adaptive Payments SDK - Magento Developers Paradise

Adaptive Payments?

Simple API that allows you to do: •  Simple payments (1:1) •  Parallel payments (1:n) •  Chained payments (1:1:n) •  Instant •  Delayed

Page 12: Adaptive Payments SDK - Magento Developers Paradise

Roles

Sender Receiver

API Caller

Payment

Page 13: Adaptive Payments SDK - Magento Developers Paradise

Simple payments

Page 14: Adaptive Payments SDK - Magento Developers Paradise

Parallel Payments

Interesting for: •  Paying off a trip •  A cart from different

merchants

Page 15: Adaptive Payments SDK - Magento Developers Paradise

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

Page 16: Adaptive Payments SDK - Magento Developers Paradise

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

Page 17: Adaptive Payments SDK - Magento Developers Paradise

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

Page 18: Adaptive Payments SDK - Magento Developers Paradise

Adaptive Payments SDK

•  SDK is available for: •  C# •  Java •  PHP

•  Supports different data formats: •  NVP •  SOAP •  JSON

Page 19: Adaptive Payments SDK - Magento Developers Paradise

SDK-Download

http://bit.ly/S6WC2Q (PHP) or at

x.com/developers/paypal

Page 20: Adaptive Payments SDK - Magento Developers Paradise

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/

Page 21: Adaptive Payments SDK - Magento Developers Paradise

Example

Handle a parallel payment to multiple receivers in 3 easy steps

Page 22: Adaptive Payments SDK - Magento Developers Paradise

1. Initial setup

Uses predefined constants

Page 23: Adaptive Payments SDK - Magento Developers Paradise

2. Set the sender & receiver(s)

Page 24: Adaptive Payments SDK - Magento Developers Paradise

3. Finally pay

Page 25: Adaptive Payments SDK - Magento Developers Paradise

Response

The pay key can be used to obtain detailed information. It can be used as unique identifier.

Page 26: Adaptive Payments SDK - Magento Developers Paradise

Demo

Open Demo

Page 27: Adaptive Payments SDK - Magento Developers Paradise

Résumé

•  Nice to build marketplaces •  Enables processing more complex payments •  Preapproval rocks! •  Very convenient for digital goods: •  Music •  Videos •  Games

Page 28: Adaptive Payments SDK - Magento Developers Paradise

PayPal troubleshooting

API documentation & guides: x.com/developers/paypal

Merchant technical service: paypal.com/mts

Page 29: Adaptive Payments SDK - Magento Developers Paradise

Personal contact

@SeraAndroid / @PayPalEuroDev

gplus.to/SeraAndroid

github.com/seraphimserapis

slideshare.net/PayPalEUDevs

Page 30: Adaptive Payments SDK - Magento Developers Paradise

QA

Questions?

Page 31: Adaptive Payments SDK - Magento Developers Paradise

Thanks!