OpenCart 🇺🇦

Схема

public mixed orderAction ( )

Аргументы

Аргумент Возможный тип Описание
У метода нет аргументов

Описание

Метод пока еще не документирован.

Исходный код

if ($this->config->get('pp_express_status')) {
	$this->load->model('payment/pp_express');
	$this->load->language('payment/pp_express_order');

	$paypal_order = $this->model_payment_pp_express->getOrder($this->request->get['order_id']);

	if ($paypal_order) {
		$this->data['text_payment_info'] = $this->language->get('text_payment_info');
		$this->data['text_capture_status'] = $this->language->get('text_capture_status');
		$this->data['text_amount_auth'] = $this->language->get('text_amount_auth');
		$this->data['btn_void'] = $this->language->get('btn_void');
		$this->data['btn_capture'] = $this->language->get('btn_capture');
		$this->data['text_amount_captured'] = $this->language->get('text_amount_captured');
		$this->data['text_amount_refunded'] = $this->language->get('text_amount_refunded');
		$this->data['text_capture_amount'] = $this->language->get('text_capture_amount');
		$this->data['text_complete_capture'] = $this->language->get('text_complete_capture');
		$this->data['text_transactions'] = $this->language->get('text_transactions');
		$this->data['text_complete'] = $this->language->get('text_complete');
		$this->data['text_confirm_void'] = $this->language->get('text_confirm_void');
		$this->data['error_capture_amt'] = $this->language->get('error_capture_amt');
		$this->data['text_view'] = $this->language->get('text_view');
		$this->data['text_refund'] = $this->language->get('text_refund');
		$this->data['text_resend'] = $this->language->get('text_resend');
		$this->data['column_trans_id'] = $this->language->get('column_trans_id');
		$this->data['column_amount'] = $this->language->get('column_amount');
		$this->data['column_type'] = $this->language->get('column_type');
		$this->data['column_status'] = $this->language->get('column_status');
		$this->data['column_pend_reason'] = $this->language->get('column_pend_reason');
		$this->data['column_created'] = $this->language->get('column_created');
		$this->data['column_action'] = $this->language->get('column_action');

		$this->data['paypal_order'] = $paypal_order;
		$this->data['order_id'] = $this->request->get['order_id'];
		$this->data['token'] = $this->session->data['token'];

		$captured = number_format($this->model_payment_pp_express->totalCaptured($this->data['paypal_order']['paypal_order_id']), 2);
		$refunded = number_format($this->model_payment_pp_express->totalRefundedOrder($this->data['paypal_order']['paypal_order_id']), 2);

		$this->data['paypal_order']['captured'] = $captured;
		$this->data['paypal_order']['refunded'] = $refunded;
		$this->data['paypal_order']['remaining'] = number_format($this->data['paypal_order']['total'] - $captured, 2);

		if ($paypal_order) {
			$captured = number_format($this->model_payment_pp_express->totalCaptured($paypal_order['paypal_order_id']), 2);
			$refunded = number_format($this->model_payment_pp_express->totalRefundedOrder($paypal_order['paypal_order_id']), 2);

			$this->data['paypal_order'] = $paypal_order;

			$this->data['paypal_order']['captured'] = $captured;
			$this->data['paypal_order']['refunded'] = $refunded;
			$this->data['paypal_order']['remaining'] = number_format($paypal_order['total'] - $captured, 2);
		}

		$this->data['refund_link'] = $this->url->link('payment/pp_express/refund', 'token=' . $this->session->data['token'], 'SSL');
		$this->data['view_link'] = $this->url->link('payment/pp_express/viewTransaction', 'token=' . $this->session->data['token'], 'SSL');
		$this->data['resend_link'] = $this->url->link('payment/pp_express/resend', 'token=' . $this->session->data['token'], 'SSL');

		$this->template = 'payment/pp_express_order.tpl';
		$this->response->setOutput($this->render());
	}
}