/** * This method makes sure we require payment for the particular gateway being used. * * @param jigoshop_payment_gateway $gateway the payment gateway * that is being used during checkout * @return boolean true when the gateway should be processed, otherwise false * @since 1.2 */ public static function process_gateway($gateway) { if ($gateway === null) { if (jigoshop_cart::$subtotal > 0) { jigoshop::add_error(__('Invalid payment method.', 'jigoshop')); } return false; } $shipping_total = jigoshop_cart::$shipping_total; if (self::get_options()->get('jigoshop_prices_include_tax') == 'yes') { $shipping_total += jigoshop_cart::$shipping_tax_total; } return $gateway->process_gateway(number_format((double) jigoshop_cart::$subtotal, 2, '.', ''), number_format((double) $shipping_total, 2, '.', ''), number_format((double) jigoshop_cart::$discount_total, 2, '.', '')); }