/[drupal]/contributions/modules/uc_zpayment/uc_zpayment.pages.inc
ViewVC logotype

Contents of /contributions/modules/uc_zpayment/uc_zpayment.pages.inc

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (show annotations) (download) (as text)
Wed Jan 14 01:41:31 2009 UTC (10 months, 1 week ago) by ibabushka
Branch: MAIN
CVS Tags: DRUPAL-6--1-0-BETA1, HEAD
Branch point for: DRUPAL-6--1
File MIME type: text/x-php
Initial commit of uc_zpayment module.
1 <?php
2 // $Id$
3
4 function uc_zpayment_complete (){
5
6 watchdog('zpayment', 'Receiving new order notification for order !order_id.', array('!order_id' => check_plain($_POST['LMI_PAYMENT_NO'])));
7
8 $cart_id = intval($_POST['LMI_PAYMENT_NO']);
9
10 $order = uc_order_load($cart_id);
11
12 if ($order === FALSE || uc_order_status_data($order->order_status, 'state') != 'in_checkout') {
13 print t('An error has occurred during payment. Please contact us to ensure your order has submitted.');
14 exit();
15 }
16
17
18 if (strtolower($_POST['CLIENT_MAIL']) !== strtolower($order->primary_email)) {
19 uc_order_comment_save($order->order_id, 0, t('Customer used a different e-mail address during payment: !email', array('!email' => check_plain($_POST['CLIENT_MAIL']))), 'admin');
20 }
21
22 $url = 'cart/zpayment/finalize/'. $order->order_id;
23 uc_zpayment_redirect_url($url);
24
25 }
26

  ViewVC Help
Powered by ViewVC 1.1.2