Home  |  Documentation  |  Forum  |  Blog Log in / create account  
Navigation
  • Main Page
  • Community portal
  • Current events
  • Recent changes
  • Random page
  • Help
  • Donations
 
Toolbox
  • What links here
  • Related changes
  • Upload file
  • Special pages
  • Printable version
  • Permanent link
Views
  • Article
  • Discussion
  • View source
  • History

PayPal Integration

From AuctionBlox

Jump to: navigation, search

Contents

  • 1 PayPal Integration
    • 1.1 'PayPal Express Checkout' and 'PayPal Pro Direct Payments & Express Checkout'
    • 1.2 Official osCommerce PayPal IPN Module v1.0 For 2.2MS2 by osCommerce Team
    • 1.3 PayPal Shopping Cart IPN by DevOsc

PayPal Integration

There are many OS Commerce contributions for PayPal. AuctionBlox recommends using PayPal Express Checkout in combination with the PayPal Express Checkout IPN. AuctionBlox 4.5.1 or later also works with the PayPal Pro Direct Payments & Express Checkout contribution for customers who use PayPal's Website Payments Pro package.

The integration steps listed below are required for both of these contributions.

After that is documentation for integrating with other PayPal contributions.

'PayPal Express Checkout' and 'PayPal Pro Direct Payments & Express Checkout'

For both contributions, find these files:

* <catalog>/ec_shipping.php
* <catalog>/express_checkout.php

Then perform the following integration steps for both files:

  • Find:

     require(DIR_WS_CLASSES . 'shipping.php');
     $shipping_modules = new shipping($shipping);

  • Replace with:

     //+++AUCTIONBLOX.COM
     require(DIR_WS_MODULES . 'auctionblox/includes/classes/abxShipping.php');
     $shipping_modules = new abxShipping;
     //+++AUCTIONBLOX.COM


Official osCommerce PayPal IPN Module v1.0 For 2.2MS2 by osCommerce Team

  • Find line 221 in <catalog>/ext/modules/payment/paypal_ipn/ipn.php
}        // PRODUCT LOOP ENDS HERE
#######################################################
  • Just below ADD:

 //+++AUCTIONBLOX.COM
 // Reset the cart and do any cart-specific cleanup
 // cart is created in application_top.php.  Bootstrap the current instance
 $GLOBALS['customer_id'] = (int)$_POST['custom'];
 $cart->restore_contents();
 $cart->reset(true);
 //+++AUCTIONBLOX.COM

PayPal Shopping Cart IPN by DevOsc

  • Find line 70 in <catalog>/ipn.php

     $PayPal_osC_Order->removeCustomersBasket($order->customer['id']);

- OR -

     tep_db_query("delete from " . TABLE_CUSTOMERS_BASKET . " where customers_id = '" . (int)$order->customer['id'] . "'");
     tep_db_query("delete from " . TABLE_CUSTOMERS_BASKET_ATTRIBUTES . " where customers_id = '" . (int)$order->customer['id'] . "'");

  • Comment out the above lines and add the following code beneath:
  //+++AUCTIONBLOX.COM
  $GLOBALS['customer_id'] = (int)$order->customer['id'];

  require_once(DIR_WS_MODULES . 'auctionblox/includes/classes/abxCurrencies.php');
  $currencies = new abxCurrencies;

  require_once(DIR_WS_MODULES . 'auctionblox/includes/classes/abxCart.php');  
  tep_session_register('cart');
  $cart = new abxCart;

  $cart->restore_contents();
  $cart->reset(true, $PayPal_osC_Order->orderID);
  //+++AUCTIONBLOX.COM
Retrieved from "http://members.auctionblox.com/community/documentation/index.php/PayPal_Integration"
© 2003-2008 AuctionBlox Inc. All Rights Reserved.