Jump to content


Corporate Sponsors


Latest News: (loading..)

A logical error on paypal payment module


  • You cannot reply to this topic
No replies to this topic

#1 osCommerce China

  • Community Member
  • 5 posts
  • Real Name:Lin Yang

Posted 14 July 2011, 03:51

I Think There is a logical error on process paypal payment.

File:paypal_standard.php

When a user create a order and check confirm order. There is a pre order create in database and then go to paypal.

When this user back and change his shipping address or billing address and then process order again. the order id is the same and the shipping and billing address not change.

Let look the code

function pre_confirmation_check() {

global $cartID, $cart;



if (empty($cart->cartID)) {

$cartID = $cart->cartID = $cart->generate_cart_id();

}



if (!tep_session_is_registered('cartID')) {

tep_session_register('cartID');

}

}

only there is no cartID will create a new card id. or modify the shipping cart the new card will create.

but in the order process function

if the $cartID is exit and $cart_PayPal_Standard_ID exit.
the order is in datebase

function confirmation() {
.......
if (tep_db_num_rows($check_query) < 1) {
delete order .....

is have order and will not remove old order infomation

so the shippping address and billing address will not update.