Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Is that a bug?


limor01

Recommended Posts

Hello

 

I have been using the module for a month now.

I have never been able to see the order in "PayPal IPN - Start" status.

 

The order information is saved on the confirmation() function

 

but the status is taken from the order object instead of the member variable $order_status of this class.

So I fixed it by adding the variable to the class declaration like:

 

class paypal_ipn {

var $code, $title, $description, $enabled, $identifier, $order_status;

 

and

if ((int)MODULE_PAYMENT_PAYPAL_IPN_PREPARE_ORDER_STATUS_ID > 0) {

$this->order_status = (int)MODULE_PAYMENT_PAYPAL_IPN_PREPARE_ORDER_STATUS_ID;

}

 

 

and made the following change to the data array sent to the database:

 

$sql_data_array = array('customers_id' => $customer_id,

bla bla bla

bla bla bla

bla bla bla

bla bla bla

bla bla bla

'orders_status' => $this->order_status,

bla bla bla

bla bla bla

bla bla bla

bla bla bla

);

 

 

also in

 

 

//+1.4

$sql_data_array = array('orders_id' => $insert_id,

'orders_status_id' => $this->order_status,

'date_added' => 'now()',

'customer_notified' => '0',

'comments' => $order->info['comments']);

 

tep_db_perform(TABLE_ORDERS_STATUS_HISTORY, $sql_data_array);

//-1.4

 

 

 

 

All of this looks like something nobody can miss so I am thinking I did a mess :-) and this is not a bug as I think.

The code goes back so long that I am not sure If my fix is true.

 

 

Thanks

Link to comment
Share on other sites

No this is not bug, simply php object oriented way to say $order_status

Please read this line: Do you want to find all the answers to your questions? click here. As for contribution database it's located here!

8 people out of 10 don't bother to read installation manuals. I can recommend: if you can't read the installation manual, don't bother to install any contribution yourself.

Before installing contribution or editing/updating/deleting any files, do the full backup, it will save to you & everyone here on the forum time to fix your issues.

Any issues with oscommerce, I am here to help you.

Link to comment
Share on other sites

No this is not bug, simply php object oriented way to say $order_status

 

 

I know that...

You didnt read the original paypal IPN code.

I was refering the fact that the wrong variable was used. My bold text is the variable that I think should have been used.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...