/[drupal]/contributions/modules/ubercart/payment/uc_paypal/uc_paypal.module
ViewVC logotype

Diff of /contributions/modules/ubercart/payment/uc_paypal/uc_paypal.module

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

revision 1.4.2.15 by rszrama, Fri Jan 16 22:12:35 2009 UTC revision 1.4.2.16 by rszrama, Wed Nov 18 21:13:32 2009 UTC
# Line 717  function uc_paypal_ipn($order_id = 0) { Line 717  function uc_paypal_ipn($order_id = 0) {
717    
718  // Handles a complete Website Payments Standard sale.  // Handles a complete Website Payments Standard sale.
719  function uc_paypal_complete($order_id = 0) {  function uc_paypal_complete($order_id = 0) {
720      // If the order ID specified in the return URL is not the same as the one in
721      // the user's session, we need to assume this is either a spoof or that the
722      // user tried to adjust the order on this side while at PayPal. If it was a
723      // legitimate checkout, the IPN will still come in from PayPal so the order
724      // gets processed correctly. We'll leave an ambiguous message just in case.
725    if (intval($_SESSION['cart_order']) != $order_id) {    if (intval($_SESSION['cart_order']) != $order_id) {
726      $_SESSION['cart_order'] = $order_id;      drupal_set_message(t('Thank you for your order! We will be notified by PayPal that we have received your payment.'));
727        drupal_goto('cart');
728    }    }
729    
730    if (!($order = uc_order_load($order_id))) {    if (!($order = uc_order_load($order_id)) || $order->payment_method != 'paypal_wps') {
731      drupal_goto('cart');      drupal_goto('cart');
732    }    }
733    

Legend:
Removed from v.1.4.2.15  
changed lines
  Added in v.1.4.2.16

  ViewVC Help
Powered by ViewVC 1.1.3