orders->get_order((int)$order_id); $purchases = $this->orders->get_purchases(array('order_id'=>intval($order->id))); $payment_method = $this->payment->get_payment_method($order->payment_method_id); $currency = $this->money->get_currency(intval($payment_method->currency_id)); $payment_settings = $this->payment->get_payment_settings($payment_method->id); if($payment_settings['mode'] == 'sandbox') $paypal_url = "https://www.sandbox.paypal.com/cgi-bin/webscr"; else $paypal_url = "https://www.paypal.com/cgi-bin/webscr"; $ipn_url = $this->config->root_url.'/payment/Paypal/callback.php'; $success_url = $this->config->root_url.'/order/'.$order->url; $fail_url = $this->config->root_url.'/order/'.$order->url; $button = "
"; if($order->discount>0) $button .= ""; if($order->coupon_discount>0) { $coupon_discount = $this->money->convert($order->coupon_discount, $payment_method->currency_id, false); $button .= ""; } $i = 1; foreach($purchases as $purchase) { $price = $this->money->convert($purchase->price, $payment_method->currency_id, false); $price = number_format($price, 2, '.', ''); $button .= "variant_name."'> "; $i++; } $delivery_price = 0; if($order->delivery_id && !$order->separate_delivery && $order->delivery_price>0) { $delivery_price = $this->money->convert($order->delivery_price, $payment_method->currency_id, false); $delivery_price = number_format($delivery_price, 2, '.', ''); $button .= ""; } $button .= "
"; return $button; } }