close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Processing a cookie with PHP

Thread began 1/29/2010 4:57 am by info58953 | Last modified 2/08/2010 11:13 am by info58953 | 5647 views | 10 replies

info58953

Yes, the cookie has been saved with the correct name. I've set the cookie in the first page (order form):

WA_setCookie(WA_CookieObj,'Amount',document.form1.Amount.value,true,0,30);

This works fine because I can display the cookie on the next page:

The total amount is:
<script name="WACookieDis">
document.write(WA_CookieObj.getValue("Amount"));
</script>

So this looks okay, Cookies Toolkit stores en displays the cookie named "Amount".

--------------------------------------------------------------------

After the orderform was submitted a next (second) page shows order details and forwards customer to the payment provider with several variables. One of them is the total amount value $amount, i.c. the cookie named "Amount". This is my code on the second page:

<?php
require_once('ideal.class.php');
$partner_id = '12345';
$amount = '1250'
...
<html>
<head>
<title>Second Page</title>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<script src="WA_Cookies/Cookies.js"></script>
...
</head>
<body>
...
Here the cookie is shown:
<script name="WACookieDis">
document.write(WA_CookieObj.getValue("Amount"));
</script>
...
[parts of payment provider PHP code stays here]
...
</body>
</html>

When I use in this page:

$amount = $_COOKIE["Amount"];

the payment provider reports an error "amount not correct" without further comments. But when I use:

$amount ='1250';

the payment provider accepts the request, everything is okay. So i'm afraid "$amount" is not filled with the cookie "Amount" by using $amount = $_COOKIE["Amount"];

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