You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
information-system/webht/third_party/paypal/controllers/payment.php

40 lines
1.3 KiB
PHP

<?php
if (!defined('BASEPATH'))
exit('No direct script access allowed');
class Payment extends CI_Controller
{
public function __construct()
{
parent::__construct();
$this->permission->is_admin(false);
}
public function index()
{
$data=array();
if ($this->input->post('price')) {
//文字链接
$paylink='https://www.chinahighlights.com/securepayment/?'.
'Site_Language='.$this->input->post('lan').'&'.
'Site_CurrencyType='.$this->input->post('currency').'&'.
'Site_ACD=100-200-300&'.
'Site_OnlyPaymentType=0-1&'.
'Order_ID='.$this->input->post('orderid').'&'.
'Order_TotalCost='.trim($this->input->post('price')).'&'.
'Order_Name='.urlencode($this->input->post('description')).'&'.
'Order_PaymentType=Motopay&'.
'ToEmail=';
//图片链接
$data['payurl']='<a href="'.$paylink.'" target="_blank"><img border="0" alt="Pay now" src="http://www.chinahighlights.com/pic/pay-button.png" width="354" height="85" /></a>';
$data['paylink']=$paylink;
}
$this->load->view('n-header', $data);
$this->load->view('payment');
$this->load->view('n-footer');
}
}