Forum Moderators: buckworks

Message Too Old, No Replies

Callback script for Worldpay javascript example

Worldpay callback script

         

Misty24

12:09 pm on Aug 6, 2006 (gmt 0)

10+ Year Member



Hi,

I need to start using the Worldpay callback facility, but I have little experience of writing javascript. Any thoughts on where I could go for more information?

I have looked at the examples on Worldpay's site.

Thanks
Misty

shri

5:14 am on Aug 7, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Misty,

Where exactly do you need Javascript? We've been using Worldpay for several years now. If you could get a little bit specific (no domain urls etc) about what you're trying to do, I could take a look and try to help you.

RailMan

8:11 am on Aug 7, 2006 (gmt 0)

10+ Year Member



use a shopping cart - they have the callback built in

and you don't write a callback script in javascript - it'll be written in php or asp or perl etc

[edited by: RailMan at 8:13 am (utc) on Aug. 7, 2006]

Misty24

8:23 am on Aug 7, 2006 (gmt 0)

10+ Year Member



Hi, thanks for your helpful comments.

I built a very simple cart myself using asp. The site and cart are up and running so I really don't want to move to a new cart. Reading through the Worldpay documentation I got the impression I would need to write javascript, but writing asp would be a lot easier for me. The problem is I am still a novice.

Basically I am selling one of a kind items so I want to use the callback facility so that successful transactions are sent back to my database and the product is marked as sold. At the moment I am doing this manually when I get emails from Worldpay, but as sales are going up the risk that one item is sold twice is increasing.

I understand GET and POST, but I am not sure how to insert the data that comes back from Worldpay into my database.

Thanks again
Misty

mattur

9:04 am on Aug 7, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Worldpay "Select Junior" callback works by doing a POST request for a url on your website, with the transaction data in the POST parameters. You specify the callback url in your Worldpay control panel.

Note that the url is fetched from your website and displayed via the worldpay server (i.e. the customers browser will show a worldpay url, but with your callback page's HTML), so links, image paths etc need to be adjusted accordingly.

You can pass a cartID to Worldpay; this is then returned in the callback POST, along with other transaction info, so you can use this to identify the order.

You then update the relevant order with the callback paid/cancelled/rejected info, update your stock levels, display a message etc - all in your callback page code.

There's lots of info on the Worldpay Support website - see the Select Junior Callback FAQ [support.worldpay.com]. HTH.