When I submit my cart, it bumps to paypal but if I cancel, it kicks back to my transaction details page but does not show transaction canceled or anything like that. Nor does it empty my cart. Any ideas?
Thanks!
The free community support forum is a place where WP e-Commerce users can work with other WP e-Commerce users to help one another get their shops up and running. There is no gaurantee that an Instinct staff member will respond to your topic within the free forum.
Acting out, swearing and threats are not tolerated, please play nice, we are all doing the best we can with the resources available.
When I submit my cart, it bumps to paypal but if I cancel, it kicks back to my transaction details page but does not show transaction canceled or anything like that. Nor does it empty my cart. Any ideas?
Thanks!
Same here.. Would be nice with a page actually telling people that they canceled the order...
I agree
Has anyone had a resolution to this? I'm not getting a cancelled either, and it seems to still be recording the order as a sale in the backend.
If happy to go fix this code myself if someone will point me in the right direction.
Okay, I fixed this for myself and I wanted to post the steps I followed in case this will help anyone else. I hope the code comes across okay.
So, step # 1. I created a page in Wordpress called "Transaction Canceled". On here, I put some text about you have canceled your order... your items are still in your cart and you can checkout again... etc.
Next, since I'm using PayPal Standard, I went to the /blog/wp-content/plugins/wp-e-commerce/merchants/paypal_multiple.php file.
In here, you want to search for:
// paypal connection variables
This gets you to the section where the HTML variables passed to paypal are constructed.
In there you will see this line:
$data['cancel_return'] = urlencode($transact_url);
Change this so that it goes to the page you just made like this:
$data['cancel_return'] = urlencode('http://www.YOURWESBSITE.com/blog/products-page/transaction-canceled');
While this won't change the behavior of an order being booked into the sales section, it will at least deliver a better experience to the consumer.
Note, there are other ways you could do this - like defining another variable to pass or a language variable for the cancel_return. This is just the fastest way to implement the fix that I could find, not necessarily the prettiest ;-)
Thanks bghouse, I'll give this a go for now but I hope this will be fixed in 3.7.6 when released.
hello bghouse,
i tried to implement your solution and changed paypal_multiple.php acoording to your advise however it does not affect anything. i am working with the paypal express option, could it be that this is not the file i need to change?
thanks!!
Hi,
If you have access to the database you can edit the page a transaction is cancelled in the wp-options table - it's in the row where option_name = 'transact_url'.
To change it run this SQL ( backup the table first, just in case... ):
UPDATE wp-options
SET option_value = 'http://www.YOURWESBSITE.com/page-to-return-to-if-cancelled'
WHERE option_name = 'transact_url'
doesn't help with the order status but it might be a bit easier than editing the php.
Thank @bghouse for the idea though :)
Hi,
If you have access to the database you can edit the page a transaction is cancelled in the wp-options table - it's in the row where option_name = 'transact_url'.
To change it run this SQL ( backup the table first, just in case... ):
UPDATE wp-options
SET option_value = 'http://www.YOURWESBSITE.com/page-to-return-to-if-cancelled'
WHERE option_name = 'transact_url'
doesn't help with the order status but it might be a bit easier than editing the php.
Thank @bghouse for the idea though :)
this site also seems to throw up a blank screen after a post - appologies for the double post above....
If everyone could ignore the post above - I've just discovered that by changing this in the db it also changes the url when the transaction is successful......
Here is an if statement that you can put at the bottom of transaction_results.php page to display what you want without having to make another page
if($_SESSION['wpsc_previous_selected_gateway']== 'dps') {
$sessionid = decrypt_dps_response();
//exit($sessionid);
if($sessionid != ''){
//exit('<pre>'.print_r($sessionid, true).'</pre>');
transaction_results($sessionid, true);
}else{
_e('<div class="post">Sorry your transaction was not accepted.<br /><a href='.get_option("shopping_cart_url").'>Click here to go back to the checkout page.</a></div>');
}
} else if(transaction_results($sessionid, true) == ''){
echo '<div class="post">Sorry your transaction was not completed.<br /><a href='.get_option("shopping_cart_url").'>Click here to go back to the checkout page.</a></div>';
} else {
echo '<div class="post">';
echo transaction_results($sessionid, true);
echo '</div>';
}
This is the statement for my results page it just redirects the user back to the checkout page. You can do whatever you want.
} else if(transaction_results($sessionid, true) == ''){
echo '<div class="post">Sorry your transaction was not completed.<br /><a href='.get_option("shopping_cart_url").'>Click here to go back to the checkout page.</a></div>';
}You must log in to post.