PayPal Integration
From AuctionBlox
Contents |
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






