close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Ecart 5 - Paypal Standard - Clearing the Cart on Success

Thread began 5/12/2014 1:51 pm by Meic Delwedd | Last modified 5/13/2014 8:24 am by Meic Delwedd | 1731 views | 4 replies

Meic Delwedd

Ecart 5 - Paypal Standard - Clearing the Cart on Success

Hi,

I have setup a cart using Ecart 5 and PayPal standard payments.

I have got the IPN working and updating my cart by passing the order_id in the "custom" field and then using this to update my orders.

On the checkout_success.php page, I have included the code outlined on http://www.webassist.com/forums/posts.php?id=20025, which works a treat. (My cart is a basic one at the moment - I'm not worried abut users logging in and storing their details at present).

My issue is that once a customer makes a payment, if they choose not to return to the checkout_success.php file by typing the URL of my shopping cart into a browser, their cart is still populated. What is worse is that now they can add extra items to their order, and because a payment has been made for that order id, they could add items to their order, press "checkout", and the system thinks they have items that they haven't paid for.

What I am after is if there is a way to clear the cart if an order_id is set in the session on load of the cart, will this work?

Or, I can set some validation on the checkout button (or confirm.php page), where the system checks the status based on the order id and maybe throws and exception or clears the session at that point to prevent anyone manipulating this flaw.

Or, I could use the mc_gross field recieved from the IPN, store this in the DB, and then flag up a possible security issue in the administration system, but this seems a bit messy to me.

I've been looking at the forums, and can't find any similar issue on the forums, hopefully this an easy fix.

Thanks,

Aled

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...