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"];