Forum Moderators: buckworks

Message Too Old, No Replies

WorldPay CallBack - help

I need help implementing callback

         

crookyboy

1:47 am on Oct 3, 2003 (gmt 0)

10+ Year Member



Hi,

Im getting so annoyed with WorldPay.

Im having to implement a callback operation through WorldPay.com.

Basically what I want to do is once a customer has purchased something off my clients site through WorldPay they get sent to one of his PHP pages so that the order can be logged via a MySQL command (to say that the order was confirmed).

I have tried everything and cant get the thing to work, it just defaults to their pages.

Does anyone have experience in the callback facility?

Here is a page from WorldPay:
[select.worldpay.com...]

I have read all their documentation and emailed them but no help was found it just blinds you with science.

dmorison

4:08 am on Oct 3, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi,

First up, are you seeing a request to your callback page from WorldPay's servers in your logs?

Second up, the first thing to do when implementing any kind of callback is to ignore any logging or SQL stuff that you want to do and just make sure that the callback process works ok. Just return a simple HTML response containing a link back to your ecommerce site.

Start with this:

callback.php


<?php
echo("<WPDISPLAY ITEM=banner>");
echo("<br>");
echo("<a href='http://www.yourdomain.com/returnpage.html'>click here to finish</a>");
?>

Once that works, then incorporate your logging. Remember if there is any error at all at your end WorldPay will just serve the default payment complete page.

crookyboy

1:09 pm on Oct 3, 2003 (gmt 0)

10+ Year Member



Hi,

Thanks for your reply. This is what I want to do:

A purchaser, upon completion of the sale is directed to my sites .php pages - this page will allow me to make a database entry to say that the purchaser has made payment.

I do not want them to click a button to say "Continue" or anything as they may not click this, they dont have to after all.

Regards

James

dmorison

6:26 pm on Oct 3, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi James,

The idea is that you have done everything you need to complete the transaction before the user clicks on "click here to finish" - that is, your callback script makes database entries, fires off emails, or whatever, before the user has the option to click on that link.

You are quite right - they may not do; but that doesn't matter - their transaction should be complete by that point.

WorldPay _have_ to display a response to your customer following the transaction, come what may. If your callback script fails, they will display the default page.

However, with the callback, WorldPay give you the opportunity to display their response (inserted at the point in your callback output that contains <WPDISPLAY ITEM=banner> inline with your own code; which is your opportunity to bring the customer back to your site - take it or leave it.

If you are having trouble making this work, I would recommend that you let somebody that is familiar with WorldPay help you - it is money at stake after all. The WorldPay support site lists plenty of solution partners who will help you integrate with their systems.

crookyboy

12:15 am on Oct 4, 2003 (gmt 0)

10+ Year Member



Thanks for your help mate, I got it working in the end : )