public function saveCartOrder($rawPost) { Cart66Common::log('[' . basename(__FILE__) . ' - line ' . __LINE__ . "] Calling Cart66PayPalIpn::saveCartOrder: " . print_r($rawPost, true)); if ($rawPost['mc_gross'] >= 0) { $decodedPost = $this->_decodeRawPost($rawPost); $paypal = new Cart66PayPalStandard(); Cart66Common::log('[' . basename(__FILE__) . ' - line ' . __LINE__ . "] About to hit Cart66PayPalStandard::saveOrder"); $paypal->saveOrder($decodedPost); } }
<!-- PayPal Checkout --> <?php if (isset($_POST['cmd'])) { $paypalAction = 'https://www.paypal.com/cgi-bin/webscr'; if (SANDBOX) { $paypalAction = 'https://www.sandbox.paypal.com/cgi-bin/webscr'; } // store pending order with all information, then send to paypal at the above address via curl... so as to keep all the post data require_once CART66_PATH . "/gateways/Cart66PayPalStandard.php"; $paypalStandard = new Cart66PayPalStandard(); $pendingOrderId = $paypalStandard->storePendingOrder(); $order = new Cart66Order($pendingOrderId); $_POST['custom'] = $order->ouid . $_POST['custom']; Cart66Session::set('Cart66PendingOUID', $order->ouid); wp_redirect($paypalAction . '?' . http_build_query($_POST, '', '&')); exit; } $taxRate = new Cart66TaxRate(); $items = Cart66Session::get('Cart66Cart')->getItems(); $shipping = Cart66Session::get('Cart66Cart')->getShippingCost(); $shippingMethod = Cart66Session::get('Cart66Cart')->getShippingMethodName(); $setting = new Cart66Setting(); $paypalEmail = Cart66Setting::getValue('paypal_email'); if (!$paypalEmail) { throw new Cart66Exception('Invalid PayPal Standard Configuration', 66504); } $returnUrl = Cart66Setting::getValue('paypal_return_url'); $promotion = Cart66Session::get('Cart66Promotion'); $checkoutOk = true; if (Cart66Session::get('Cart66Cart')->requireShipping()) { $liveRates = Cart66Setting::getValue('use_live_rates');