Magento

44
PayPal Integration in Magento 0 10441 Jefferson Blvd. Suite 200, Culver City, CA 90232 | Magento.com

description

Test Descritpion

Transcript of Magento

Page 1: Magento

PayPal Integration in Magento 0

10441 Jefferson Blvd. Suite 200, Culver City, CA 90232 | Magento.com

Page 2: Magento

PayPal Integration in Magento 1

PayPal Integration in Magento

1. What is new in 1.4.1

2. PayPal business logic overview

3. Application integration overview

10441 Jefferson Blvd. Suite 200, Culver City, CA 90232 | Magento.com

3. Application integration overview

4. Debugging and troubleshooting

Page 3: Magento

PayPal Integration in Magento 2

10441 Jefferson Blvd. Suite 200, Culver City, CA 90232 | Magento.com

1. New PayPal Features in 1.4.1

Page 4: Magento

PayPal Integration in Magento 3

Custom Configuration UI

• Configuration section with custom

interface

• Merchant country and account

selection

10441 Jefferson Blvd. Suite 200, Culver City, CA 90232 | Magento.com

selection

• Dynamic selection of PayPal

solutions

• Various helper links, API wizard

popup

Page 5: Magento

PayPal Integration in Magento 4

Custom Configuration UI

10441 Jefferson Blvd. Suite 200, Culver City, CA 90232 | Magento.com

Page 6: Magento

PayPal Integration in Magento 5

Customer Experience

10441 Jefferson Blvd. Suite 200, Culver City, CA 90232 | Magento.com

Page 7: Magento

PayPal Integration in Magento 6

Customer Experience

10441 Jefferson Blvd. Suite 200, Culver City, CA 90232 | Magento.com

Page 8: Magento

PayPal Integration in Magento 7

Customer Experience

10441 Jefferson Blvd. Suite 200, Culver City, CA 90232 | Magento.com

Page 9: Magento

PayPal Integration in Magento 8

Customer Experience

• Configurable logos and buttons

• Custom payment selection

• Cart line items transferring

10441 Jefferson Blvd. Suite 200, Culver City, CA 90232 | Magento.com

• Cart line items transferring

• EC shipping options transferring

Page 10: Magento

PayPal Integration in Magento 9

Settlement Reports Fetching

• Multiple merchants report grid

• Fetching reports from admin

• Scheduled fetching

10441 Jefferson Blvd. Suite 200, Culver City, CA 90232 | Magento.com

• Scheduled fetching

Page 11: Magento

PayPal Integration in Magento 10

Settlement Reports Fetching

10441 Jefferson Blvd. Suite 200, Culver City, CA 90232 | Magento.com

Page 12: Magento

PayPal Integration in Magento 11

Billing Agreements

• Billing agreement wizard for customers

• Billing agreement creation in EC

• Payment method on the frontend

10441 Jefferson Blvd. Suite 200, Culver City, CA 90232 | Magento.com

• Payment method on the frontend and admin

Page 13: Magento

PayPal Integration in Magento 12

Billing Agreements

10441 Jefferson Blvd. Suite 200, Culver City, CA 90232 | Magento.com

Page 14: Magento

PayPal Integration in Magento 13

Billing Agreements

10441 Jefferson Blvd. Suite 200, Culver City, CA 90232 | Magento.com

Page 15: Magento

PayPal Integration in Magento 14

Recurring Profiles• Recurring profile option for simple

and virtual products

• Nominal items concept

• Checkout with recurring profiles

• Viewing and processing recurring

profiles

10441 Jefferson Blvd. Suite 200, Culver City, CA 90232 | Magento.com

profiles

Page 16: Magento

PayPal Integration in Magento 15

Recurring Profiles

10441 Jefferson Blvd. Suite 200, Culver City, CA 90232 | Magento.com

Page 17: Magento

PayPal Integration in Magento 16

Recurring Profiles

10441 Jefferson Blvd. Suite 200, Culver City, CA 90232 | Magento.com

Page 18: Magento

PayPal Integration in Magento 17

PayPal Recurring Profiles

• Recurring profiles creation in EC

• Improved IPN listener

10441 Jefferson Blvd. Suite 200, Culver City, CA 90232 | Magento.com

http://magento.example.com/paypal/ipn/express/

http://magento.example.com/paypal/ipn/standard/

http://magento.example.com/paypal/ipn/direct/

http://magento.example.com/paypal/ipn/

Page 19: Magento

PayPal Integration in Magento 18

Payment Review and FMF

• IPR integration

• FMF integration

• Unilateral payments

10441 Jefferson Blvd. Suite 200, Culver City, CA 90232 | Magento.com

• Unilateral payments

• New order state: Pending Review

Page 20: Magento

PayPal Integration in Magento 19

10441 Jefferson Blvd. Suite 200, Culver City, CA 90232 | Magento.com

2. PayPal Business Logic

Page 21: Magento

PayPal Integration in Magento 20

Merchant and Buyer Countries

10441 Jefferson Blvd. Suite 200, Culver City, CA 90232 | Magento.com

https://www.paypal.com/worldwide/

Page 22: Magento

PayPal Integration in Magento 21

Country-Specific Features

10441 Jefferson Blvd. Suite 200, Culver City, CA 90232 | Magento.com

Page 23: Magento

PayPal Integration in Magento 22

Solution Dependencies

10441 Jefferson Blvd. Suite 200, Culver City, CA 90232 | Magento.com

Page 24: Magento

PayPal Integration in Magento 23

Solution Dependencies

10441 Jefferson Blvd. Suite 200, Culver City, CA 90232 | Magento.com

Page 25: Magento

PayPal Integration in Magento 24

Customer Experience Guidelines

• Hotlinking to PayPal content

• EC payment selection experience

• Shortcuts, solution logos on the

10441 Jefferson Blvd. Suite 200, Culver City, CA 90232 | Magento.com

frontend

Page 26: Magento

PayPal Integration in Magento 25

Settlement Reports

10441 Jefferson Blvd. Suite 200, Culver City, CA 90232 | Magento.com

Page 27: Magento

PayPal Integration in Magento 26

Billing Agreements

10441 Jefferson Blvd. Suite 200, Culver City, CA 90232 | Magento.com

Page 28: Magento

PayPal Integration in Magento 27

Payment Review

• PayPal IPR:

– Triggered automatically by PayPal

– Can be controlled from merchant account

only

10441 Jefferson Blvd. Suite 200, Culver City, CA 90232 | Magento.com

only

• PayPal FMF:

– Managed by the merchant

– Can also be controlled from Magento

admin

Page 29: Magento

PayPal Integration in Magento 28

10441 Jefferson Blvd. Suite 200, Culver City, CA 90232 | Magento.com

3. Implementation in Magento

Page 30: Magento

PayPal Integration in Magento 29

Controller Level

• Mage_Paypal_ExpressController

• Mage_Paypal_StandardController

• Mage_Paypal_IpnController

10441 Jefferson Blvd. Suite 200, Culver City, CA 90232 | Magento.com

• Mage_Paypal_IpnController• Mage_Paypal_Adminhtml_Paypal_ReportsController

Page 31: Magento

PayPal Integration in Magento 30

Mage_Paypal_Model_Config

10441 Jefferson Blvd. Suite 200, Culver City, CA 90232 | Magento.com

Page 32: Magento

PayPal Integration in Magento 31

Payment Methods

10441 Jefferson Blvd. Suite 200, Culver City, CA 90232 | Magento.com

Page 33: Magento

PayPal Integration in Magento 32

Mage_Paypal_Model_Express_Checkout

• Requires config and quote instances

• Key methods:

– start()

– getShippingOptionsCallbackResponse()

10441 Jefferson Blvd. Suite 200, Culver City, CA 90232 | Magento.com

– getShippingOptionsCallbackResponse()

– returnFromPaypal()

– updateShippingMethod()

– place()

• Invoked by EC controller

• Invokes API, Pro, sales order/quote payments

Page 34: Magento

PayPal Integration in Magento 33

Mage_Paypal_Model_Ipn

• POST back, validate request

• Identify and validate order

• Process the payment notification: a bit

10441 Jefferson Blvd. Suite 200, Culver City, CA 90232 | Magento.com

• Process the payment notification: a bit of imperative role

• Debugging and logging

Page 35: Magento

PayPal Integration in Magento 34

“Knowledge” Models

• Mage_Paypal_Model_Cart: transforms Magento sales entity into a PayPal-valid shopping cart with totals

10441 Jefferson Blvd. Suite 200, Culver City, CA 90232 | Magento.com

shopping cart with totals

• Mage_Paypal_Model_Info:

– Mapping payment info fields, advanced

payment state determination

– Reference information: codes, labels

Page 36: Magento

PayPal Integration in Magento 35

API Models

10441 Jefferson Blvd. Suite 200, Culver City, CA 90232 | Magento.com

• NVP models – Website Payments Pro implementation through HTTP-API

• WPS model – not actually an API, just composes an order placement request form variables

Page 37: Magento

PayPal Integration in Magento 36

Settlement Report Models

• Mage_Paypal_Model_Report_Settlement

– Entity model

– Fetching and parsing reports

10441 Jefferson Blvd. Suite 200, Culver City, CA 90232 | Magento.com

– Report parameter labels

• Mage_Paypal_Model_Report_Settlement_Row

– Also an entity model

– Event labels

– Casting amounts

Page 38: Magento

PayPal Integration in Magento 37

10441 Jefferson Blvd. Suite 200, Culver City, CA 90232 | Magento.com

4. Debugging and Maintaining

Page 39: Magento

PayPal Integration in Magento 38

Debugging PayPal Methods

• No more logging to database!

• var/log/payment_<code>.log

• sensitive information is omitted from log

10441 Jefferson Blvd. Suite 200, Culver City, CA 90232 | Magento.com

• sensitive information is omitted from log

• send “correlation ID” to MTS

Page 40: Magento

PayPal Integration in Magento 39

IPN Debug

• Significant order processing events –to the order comments

• var/log/payment_<code>.log

10441 Jefferson Blvd. Suite 200, Culver City, CA 90232 | Magento.com

• var/log/payment_<code>.log

• var/log/paypal_ipn_unknown.log

• PayPal > History > IPN History

Page 41: Magento

PayPal Integration in Magento 40

Express Checkout

Known Issues

• No billing address transferring back

• Shipping options with no address yet

• Line items with crazy taxes/discounts

10441 Jefferson Blvd. Suite 200, Culver City, CA 90232 | Magento.com

• Line items with crazy taxes/discounts

Page 42: Magento

PayPal Integration in Magento 41

Recurring Payment and Billing

Agreement Known Issues

• Status unsynchronization

• RP relies on IPN only

10441 Jefferson Blvd. Suite 200, Culver City, CA 90232 | Magento.com

• Not yet full integration of RP

Page 43: Magento

PayPal Integration in Magento 42

Payflow Pro and FPS

• Merchant will stuck with order processing ☺

10441 Jefferson Blvd. Suite 200, Culver City, CA 90232 | Magento.com

Page 44: Magento

PayPal Integration in Magento 43

Questions?

[email protected]

10441 Jefferson Blvd. Suite 200, Culver City, CA 90232 | Magento.com

[email protected]

Twitter: antonmakarenko