Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

PayPal redirected to shopping_cart.php


chuntse

Recommended Posts

Hi,

I am facing a problem of the page is redirect to shopping_cart.php and the comments of order cannot be inserted into database.

How can I debug this?

Anyone knows it?

Thanks in advanced.

chuntse

Edited by chuntse
Link to comment
Share on other sites

@chuntseIt could be a number of things. Is this a new problem? If you enable the COD payment module can you complete an order? Do you have ssl enabled for the whole site, just the checkout pages or not at all? 

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Thanks you very much for paying attention to this issue.

It seems that some codes in the function did not be executed when the form was submitted to PayPal in paypal_standard.php. I am trying to find out the problem.

chuntse

Link to comment
Share on other sites

@Jack_mcs
The COD module is fine, I never known this problem, I download the original oscommerce 2.3.4.1 to test with PayPal sandbox account. When the order is completed and return from paypal, it redirects to shopping cart. I read the code of checkout_process.php, it should redirect to shopping cart, When the cart is empty.but the item is still in cart after order is completed, I just worried about if it will influence the inserting  $commemt value into database.

But the main point I am concentrating on which the $comments value couldn't be inserted into orders_status table.

I found it in the pre_before_check() of paypal_standard.php as following:

// skip before_process() if order was already processed in IPN      if ( $check['orders_status'] != OSCOM_APP_PAYPAL_PS_PREPARE_ORDER_STATUS_ID ) {        if ( tep_session_is_registered('comments') && !empty($comments) ) {          $sql_data_array = array('orders_id' => $order_id,                                  'orders_status_id' => (int)$check['orders_status'],                                  'date_added' => 'now()',                                  'customer_notified' => '0',                                  'comments' => $comments);          tep_db_perform(TABLE_ORDERS_STATUS_HISTORY, $sql_data_array);        }

Do you have any idea or any hint for me?

Thank you.

chuntse

Link to comment
Share on other sites

@chuntseDo you have the PDT token setting filled in in the Standards settings? Do you have auto-return set in your paypal account and, if so, is the return to https://.../checkout_process.php (assuming you are using ssl)?

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

@Jack_mcs
Yes, I have set the PDT token, it is required in PayPal Standard Module. The auto-return is also set in the paypal account without SSL to the checkout_process.php.

I have an online shop with merchant account, the orders all are received confirmation from IPN. I read the IPN of standard, the 'comments' is pointed to ' '. It seems that the comments will be empty. But I see there is a $orders->info['comments'] to be sent to customer by email, I tried to get this value to save to a txt file. It is empty. Is this value get from PDT?

I downloaded the original oacommerce 2.3.4.1 and bootstrap master(EDGE?) to local to test with test account of paypal. It cannot get verified from PDT and redirect to shopping cart page. The same problem in another online shop.

I really don't understand the payment procedure of paypal, the IPN and PDT will process the payment result paralleled? The one I mentioned that the $orders->info['comments'] is empty, does it mean the PDT fails to get information from paypal?

It is quite hard to sort it out.

chuntse

Link to comment
Share on other sites

@chuntseTrying to troubleshoot this problem from the code will probably not get you anywhere. I can assure the code is fine and works well. The problem is either in your settings in the admin or at paypal, assuming you have a working shop with ssl and no access limitations. I don't have a fix for you but maybe one of the following will help.

For the standard module and order is created as soon as start the process. So if you never even go to paypal to pay, the complete order should appear in admin. If that is not happening, then there is something wrong with your code. In that case, double check that you have the latest app installed (V 5.018). Also make sure you have installed it correctly for your version of oscommerce. The instructions the app can be confusing so you have to be sure not to do something that is not meant for your shops version.

The purpose of the PDT is to communicate with paypal. You are not supposed to have to set the auto-return option in your paypal account when the PDT is used but I've seen instances where it was needed so it is better to have that option set than not.

In your admin settings, be sure the email address you are using for the standard module is the correct address for the live account. You can't mix live and sandbox credentials.

If you have the cache option set in admin->Configuration, try turning it off.

You should also look at the paypal log entries in admin. They can sometimes point to the reason for a failure.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

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.

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...