%PDF-1.7 GIF89;
Server IP : 5.161.254.237 / Your IP : 216.73.216.230 Web Server : Apache System : Linux diamond.sialwebvps.com 4.18.0-553.8.1.el8_10.x86_64 #1 SMP Tue Jul 2 07:26:33 EDT 2024 x86_64 User : stellasp ( 1131) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /home/stellasp/public_html/application/controllers/ |
Upload File : |
<?php class Easypay extends CI_Controller { function __construct() { parent::__construct(); } function index() { //we don't have a default landing page redirect(''); } /* Receive postback confirmation from paypal to complete the customer's order. */ function easypay_return() { echo $paymentToken = $this->input->get('paymentToken'); echo $tokenExpiryDate = $this->input->get('tokenExpiryDate'); echo $orderRefNumber = $this->input->get('orderRefNumber'); // Verify the transaction with paypal if($paymentToken!=''){ $final ='Success'; } // Process the results if ($final == 'Success') { // The transaction is good. Finish order // set a confirmed flag in the gocart payment property $this->go_cart->set_payment_confirmed(); // send them back to the cart payment page to finish the order // the confirm flag will bypass payment processing and save up redirect('checkout/place_order/'); } else { // Possible fake request; was not verified by paypal. Could be due to a double page-get, should never happen under normal circumstances $this->session->set_flashdata('message', "<div>EasyPay did not validate your order. Either it has been processed already, or something else went wrong. If you believe there has been a mistake, please contact us.</div>"); redirect('checkout'); } } /* Customer cancelled paypal payment */ function easypay_cancel() { //make sure they're logged in if the config file requires it if($this->config->item('require_login')) { $this->Customer_model->is_logged_in(); } // User canceled using paypal, send them back to the payment page $cart = $this->session->userdata('cart'); $this->session->set_flashdata('message', "<div>Paypal transaction canceled, select another payment method</div>"); redirect('checkout'); } }