FORUMS


The Form Tools forums are no longer active, but the old posts have been archived here. Please see the Help page on how to get help / report issues.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
clear sessions and WorldPay
#1
Hello,
I'm trying to integrate WorldPay into my website and I have hit a bit of a snag. I had previously set up paypal successfully but the issue I'm having with WorldPay is trying to clear the sessions on the result page presented to the customer after they either process a payment or cancel the transaction. With PayPal it was easy to redirect to a specific page on my site and clear sessions with no problem. But WorldPay doesn't allow you to redirect at all. They require you to show certain information to the customer and in order to prevent people bypassing that info they make you stay on their own result page.

Using the payment response feature, I have a php file which pulls the form ID and submission ID from WorldPay (previously submitted to their site via a custom variable on my order form pages) and it successfully finalizes the submission in form tools if the customer completes the purchase. However, I can't seem to find a way to clear the sessions. I'm thinking it's because at that point the customer is on the WorldPay website and not my own so clearing the sessions doesn't really do anything.

Is there a way to send a clear sessions message to my site from the WorldPay site without redirecting? Strange question I know, but WorldPay really makes it difficult to customize anything and the documentation is horrendous.

A code snippet from my php file which WorldPay includes on their result page:

PHP Code:
<?php
require_once("../../form_tools/global/api/api.php");
$fields ft_api_init_form_page(8);
?>

<html><title></title><head>

</head><WPDISPLAY FILE=header.html DEFAULT="<body bgcolor=#ffffff>">

<?php
// successful payment! finalize the submission in the database
if ($_POST['transStatus'] == "Y"
{
  
ft_finalize_submission($_POST['MC_formID'], $_POST['MC_subID']);
  
ft_api_clear_form_sessions();    
}
else
{
    
ft_api_clear_form_sessions();
}
?>    
    
    <p>
    <WPDISPLAY ITEM=banner></p>
<p>
    <a class="one" href="http://sandbox.mtncamps.com"><strong>Click here to return to the Mountain Adventure Camps website</strong></a></p>
 

<WPDISPLAY FILE=footer.html DEFAULT="</body>"></html> 

Thanks.
Reply
#2
Nevermind. I got a response from WorldPay tech support saying they do allow redirects via meta-refresh as long as there is a delay of 4 or 5 seconds. Wish they had mentioned that in their documentation.

Thanks.

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)