close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Using the Update record wizzard for updating worldpay payment response

Thread began 5/10/2012 11:10 am by bill3786 | Last modified 5/18/2012 9:20 am by bill3786 | 4180 views | 13 replies |

bill3786

Using the Update record wizzard for updating worldpay payment response

Is it possible to use the Update Record wizzard on a new template generated page called wp_payment_response.php to update a column called WPtransID in the orders table. This is to record the transId parameter returned by the Worldpay payment response.

The confirm page is set up to pass the OrderID to worldpay.

Cant seem to get the script provided by Airfox to update the table so trying to do it from scratch (this is on another thread called "Worldpay confirmation emails").

The worldpay payment response is enabled, password is set, payment response URL correctly added to worldpay merchant interface.

If this can be done this way please could you help with the steps required or is there another way.

The objective is to use the payment response to update the orders table with the worldpay transId and also to generate a UE email detailing the contents of the cart and other parameters to be sent to the customer and merchant.

Sign in to reply to this post

Jason ByrnesWebAssist

yes, the DataAssist update record can be used for this.

first go to the bindings panel and click the plus button, select eCart -> Checkout -> Checkout form response.

from the gateway list, select World Pay.

this will add bindings for the wold pay past to the bindings panel.

in the update record behavior, you can set the key column to the order ID column and use the transID binding for the value.

Sign in to reply to this post

bill3786

Ok thanks.

Is this the correct procedure to generate a page for capturing the worldpay payment response?

1. Create a new page from the site template and add a database connection.
2. Use the update record wizzard as you describe.
3. Use UE to set up the automatic generation of the shopper and merchant email confirmation to show the email friendly cart details and add other bindings using the "eCart_checkoutForm" bindings.

From your post in another thread is this the correct code for the email stuff.

<?php if ($_POST['callbackPW'] == "YOUR_PASSWORD" && $_POST[transStatus] == "Y") { ?>
<?php
if (!isset($_SESSION))session_start();
if ("" == "") {
//WA Universal Email object="mail"
set_time_limit(0);
<rest of code here> What is this, is this the UE code block?
?>
<?php } ?>

Does the line <?php if ($_POST['callbackPW'] == "YOUR_PASSWORD" && $_POST[transStatus] == "Y") { ?> need to be added at the begining of the update record code block or is it added by the wizzard.

Is there anything else that needs to be added to the new page?

Sign in to reply to this post

Jason ByrnesWebAssist

this page will never be seen by the user, so adding the template to it is superfluous.


other than that, you are on the right track

Sign in to reply to this post

bill3786

Please could you clarify the entries for the update record behaviour

1st page
Trigger - any form post
Key column - OrderID
Value - what goes here, is it <?php echo ((isset($_POST["transId"]))?$_POST["transId"]:""); ?> or <?php echo $eCart1->DisplayInfo("ID"); ?> or something else?
Data type - numeric

2nd page
update values
only add a value to WPtransID column (WPtransID is new column in orders table for worldpay transId) and do not enter values for other columns. Is this correct?
value for WPtransID is <?php echo ((isset($_POST["transId"]))?$_POST["transId"]:""); ?>
data type - numeric

Sign in to reply to this post

bill3786

Really struggling with this, been trying for days with different combinations but the two parts of the worldpay payment response page are not working.

1. the update record behaviour doesnt add the worldpaytransId to the orders table

2. the email friendly cart is not sent to the customer and merchant

Attached are the relevant pages.

At first I was using a template generated page but now using just a new blank php page for the worldpay response page.

Hope you can point me in the right direction here.

Attached Files
waue_wp_payment_response_1.zip
wp_payment_response.zip
Sign in to reply to this post

Jason ByrnesWebAssist

this line of code is not correct:


php:
if ($_POST['callbackPW'] == "removed" && $_POST[transStatus] == "Y") // Trigger




it should be:

php:
if ($_POST['callbackPW'] == "removed" && $_POST['transStatus'] == "Y") // Trigger



notice the difference in referring to the transStatus post element:
$_POST['transStatus']


instead of:
$_POST[transStatus]

Sign in to reply to this post

bill3786

1.I have corrected the line you gave but still no orders table update or email sent.
I have recreated the pages attached again with the dataaasist update record and UE behaviours.

2. I noticed that there are a number of areas of text in the response page coding which display in black text as did the original transStatus. Is this significant?

3. Also after adding the UE the server behaviour was visible alongside the Update Record in the server Behaviours. But after adding the trigger stuff shown below, the UE behaviour disappeared thus not able to see to edit.

<?php if ($_POST['callbackPW'] == "removed for post" && $_POST['transStatus'] == "Y") { ?>
<?php
if (!isset($_SESSION))session_start();
if ("" == "") {

4. Lastly I added the recipient for the email confirmation as eCartCheckoutForm_email. Is this correct?

Attached Files
waue_wp_payment_response_1.zip
wp_payment_response.zip
Sign in to reply to this post

Jason ByrnesWebAssist

how are you testing this?

have you set up your account with world pay to pass the response to the page you set up? if you are not sure how to do that, you should contact world pay.

from what I can see the page seams to be set up correctly, but if you have not set your account to send the post to this page, then nothing will happen.

Sign in to reply to this post

bill3786

I am getting the worldpay standard emails to the shopper and merchant on each test purchase I do. I have done many many of these over the last few days.

Also on earlier attempts I did not use DW for the formating of the email friendly cart on the response page and this returned all the parameters from worldpay in a blank email.

I'm pretty confident that the worldpay account is set up correctly or this would not happen, would it?

Sign in to reply to this post
loading

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