Docstoc

PayPal Integration in Magento

Document Sample
PayPal Integration in Magento Powered By Docstoc
					                   PayPal Integration in Magento                  0




10441 Jefferson Blvd. Suite 200, Culver City, CA 90232 | Magento.com
                                            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
4.   Debugging and troubleshooting




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




1. New PayPal Features in 1.4.1
                10441 Jefferson Blvd. Suite 200, Culver City, CA 90232 | Magento.com
                                                PayPal Integration in Magento                  3




     Custom Configuration UI
• Configuration section with custom
  interface
• Merchant country and account
  selection
• Dynamic selection of PayPal
  solutions
• Various helper links, API wizard
  popup




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




Custom Configuration UI




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




Customer Experience




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




Customer Experience




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




Customer Experience




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




        Customer Experience
•   Configurable logos and buttons
•   Custom payment selection
•   Cart line items transferring
•   EC shipping options transferring




                         10441 Jefferson Blvd. Suite 200, Culver City, CA 90232 | Magento.com
                                          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
                                PayPal Integration in Magento                  10




Settlement Reports Fetching




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




       Billing Agreements
• Billing agreement wizard for customers
• Billing agreement creation in EC
• Payment method on the frontend
  and admin




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




Billing Agreements




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




Billing Agreements




          10441 Jefferson Blvd. Suite 200, Culver City, CA 90232 | Magento.com
                                                            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
                            PayPal Integration in Magento                  15




Recurring Profiles




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




Recurring Profiles




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




    PayPal Recurring Profiles
• Recurring profiles creation in EC
• Improved IPN listener

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/

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




    Payment Review and FMF
•   IPR integration
•   FMF integration
•   Unilateral payments
•   New order state: Pending Review




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




2. PayPal Business Logic
             10441 Jefferson Blvd. Suite 200, Culver City, CA 90232 | Magento.com
                                           PayPal Integration in Magento                  20




Merchant and Buyer Countries




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

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




Country-Specific Features




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




Solution Dependencies




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




Solution Dependencies




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




Customer Experience Guidelines
 • Hotlinking to PayPal content
 • EC payment selection experience
 • Shortcuts, solution logos on the
   frontend




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




Settlement Reports




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




Billing Agreements




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




         Payment Review
• PayPal IPR:
  – Triggered automatically by PayPal
  – Can be controlled from merchant account
    only
• PayPal FMF:
  – Managed by the merchant
  – Can also be controlled from Magento
    admin


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




3. Implementation in Magento
               10441 Jefferson Blvd. Suite 200, Culver City, CA 90232 | Magento.com
                                            PayPal Integration in Magento                  29




           Controller Level
• Mage_Paypal_ExpressController
• Mage_Paypal_StandardController
• Mage_Paypal_IpnController
• Mage_Paypal_Adminhtml_Paypal_ReportsController




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




Mage_Paypal_Model_Config




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




Payment Methods




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




Mage_Paypal_Model_Express_Checkout
• Requires config and quote instances
• Key methods:
  –   start()
  –   getShippingOptionsCallbackResponse()
  –   returnFromPaypal()
  –   updateShippingMethod()
  –   place()
• Invoked by EC controller
• Invokes API, Pro, sales order/quote payments

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




   Mage_Paypal_Model_Ipn
• POST back, validate request
• Identify and validate order
• Process the payment notification: a bit
  of imperative role
• Debugging and logging




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




      “Knowledge” Models
• Mage_Paypal_Model_Cart: transforms
  Magento sales entity into a PayPal-valid
  shopping cart with totals
• Mage_Paypal_Model_Info:
  – Mapping payment info fields, advanced
    payment state determination
  – Reference information: codes, labels


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




            API Models



• NVP models – Website Payments Pro
  implementation through HTTP-API
• WPS model – not actually an API, just
  composes an order placement request
  form variables

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




   Settlement Report Models
• Mage_Paypal_Model_Report_Settlement
  – Entity model
  – Fetching and parsing reports
  – Report parameter labels
• Mage_Paypal_Model_Report_Settlement_Row
  – Also an entity model
  – Event labels
  – Casting amounts


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




4. Debugging and Maintaining
               10441 Jefferson Blvd. Suite 200, Culver City, CA 90232 | Magento.com
                                           PayPal Integration in Magento                  38




    Debugging PayPal Methods
•   No more logging to database!
•   var/log/payment_<code>.log
•   sensitive information is omitted from log
•   send “correlation ID” to MTS




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




             IPN Debug
• Significant order processing events –
  to the order comments
• var/log/payment_<code>.log
• var/log/paypal_ipn_unknown.log
• PayPal > History > IPN History




                       10441 Jefferson Blvd. Suite 200, Culver City, CA 90232 | Magento.com
                                         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
                                          PayPal Integration in Magento                  41




Recurring Payment and Billing
  Agreement Known Issues
• Status unsynchronization
• RP relies on IPN only
• Not yet full integration of RP




                        10441 Jefferson Blvd. Suite 200, Culver City, CA 90232 | Magento.com
                                         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
                               PayPal Integration in Magento                  43




    Questions?

 anton@magento.com
Twitter: antonmakarenko




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

				
DOCUMENT INFO
Shared By:
Tags: PayPal
Stats:
views:336
posted:4/14/2011
language:English
pages:44
Description: PayPal, 1998 by Peter Thiel and Max Levchin established. Is headquartered in San Jose, California, Internet service providers, e-mail allows users to identify the identity of transfer of funds, to avoid the traditional method of mailing a check or money transfer. PayPal is also cooperation with some e-commerce website and become one of their loan payment; but when using this method of payment transfers, PayPal charges a certain amount of fee.