2022-10-12 10:30:35 - 米境通
我是opencart的新手。我正在使用2.3.0.2版本。我使用pp_standard模板创建了一个自定义付款。这是发送到支付网关的数据参数。
if($order_info){
$data['orderid']=$this->session->data['order_id'];
$data['callbackurl']=$this->url->link('extension/payment/custom_online_banking/callback');
$data['description']=trim($this->config->get('custom_online_banking_description'));
$data['tax_code']=trim($this->config->get('custom_online_banking_tax_code'));
$data['cost_center']=trim($this->config->get('custom_online_banking_cost_center'));
$data['acc_code']=trim($this->config->get('custom_online_banking_acc_code'));
$data['fund_type']=trim($this->config->get('custom_online_banking_fund_type'));
$data['project_code']=trim($this->config->get('custom_online_banking_project_code'));
$data['name']=html_entity_decode($order_info['payment_firstname'].$order_info['payment_lastname'],ENT_QUOTES,'UTF-8');
$data['amtTotal']=$this->currency->format($order_info['total'],$this->session->data['currency'],false,false);
$data['redirect']=$this->url->link('checkout/success');
return$this->load->view('extension/payment/custom_online_banking',$data);
}
付款完成后,支付网关将通过回叫发回订购和付款状态,系统将其重定向到我的页面。问题是付款失败时,它也会将其重定向到checkout/success。如果付款成功,我如何重定向,它将转到checkout/success,并且付款失败时,它将转到checkout/failure?