close ad
WARNING: Do Not Install the DREAMWEAVER CC 2017 or 2018 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

PayPal Success page.

Thread began 3/23/2009 4:34 pm by scott362735 | Last modified 3/26/2009 4:12 pm by Scott Noyes | 6150 views | 13 replies |

scott362735

PayPal Success page.

I am having a problem with the success page at check out. I am using PayPal Express checkout. I run through PayPal fine I get to the confirm page and click the button to finalize the order. The order goes to PayPal I get a PayPal notice of the order and so does the customer. But on the success page there is no info about the order other than the item that was bought. Any ideas on what I should check?

Thanks

Sign in to reply to this post

Ray BorduinWebAssist

The success page starts blank... You should be able to add all of that information from the stored session variables.

Sign in to reply to this post

scott362735

Ray,

I understand that it needs to get the info from stored session variables. My problem is that I don't know why it is not pulling the information in.

Shouldn't the payer profile bindings load the payer info. and the order bindings load the order details? Do I need the order summary and order details server behaviors set up on this page?

Thanks
Scott

Sign in to reply to this post

Ray BorduinWebAssist

Session variables should be available from all pages as well as shopping cart information. It should aready be in the bindings. You should not have to apply any server behaviors on this page.

Payer profile is often used to populate the checkout form. The checkout form submits to the confirm page and stores all of those values as session variables. Those session varialbles populate a hidden form that is used for the final transaction. In express checkout those fields are stored on the pp_confirm page from the payer profile passed back from paypal, but they are still stored as session variables. You should be able to refer to them directly on the success page.

Sign in to reply to this post

scott362735

I have no clue where I am going wrong then. Can you see a problem in the code? I have stripped out some of the html code. The only thing that will display on the page is the session id, and the item info, and the tax. Shipping will not show, paypal payer info does not show.

<?php
//WA eCart Include
require_once("WA_eCart/CESmith_PHP.php");
?>
<?php
$CESmith->GetContent();
?>
<?php
require_once("WA_eCart/PP_ECO_Scripts/PP_ECO_PHP.php");
?>
<?php
$WA_PP_ECO_GetResult = WA_PP_ECO_SOAPObject();
if ((isset($_GET["token"]) && isset($_GET["PayerID"])) || (isset($_SESSION["PayPal_ECO_Token"]) && $_SESSION["PayPal_ECO_Token"] != "")) {
$WA_PP_ECO_GetResult = WA_PP_ECO_Get_Post("", "", false);
}
?>
<?php
if ($CESmith->IsEmpty()) {
$CESmith->redirStr = "http://www.cesmithco.com";
$CESmith->cartAction = "RedirectIfEmpty";
}
?>
<?php
// WA eCart Redirect
if ($CESmith->redirStr != "") {
header("Location: ".$CESmith->redirStr);
}
?>
<?php
$_SESSION['CESmith_UPS_Quote'] = "";
unset($_SESSION['CESmith_UPS_Quote']);
?>



<tr>
<td height="304" colspan="3" valign="top" bgcolor="#FFFFFF"> <div class="eC_Clean_Moab_Verdana">
<?php
//WA eCart Show If Start
if (!$CESmith->IsEmpty()) {
?>
<h2>Order Receipt</h2><h3 class="eCart_OrderHeaderInfo">Order number: <?php echo session_id(); ?></h3><p class="eCart_OrderHeaderInfo"></p>
<table class="eC_ShoppingCart" border="0" cellspacing="0" cellpadding="0">
<tr>
<th>Name</th>
<th class="eC_PriceItem" >Price</th>
<th class="eC_FormItem" >Quantity</th>
<th class="eC_PriceItem" >Total</th>
</tr>
<?php
while (!$CESmith->EOF()) {
?>
<tr>
<td><img src="images/product/small/<?php echo $CESmith->DisplayInfo("Thumbnail"); ?>" alt="" width="110" height="110" class="eC_ProductThumb" />
<p class="eC_ItemLabel"><?php echo $CESmith->DisplayInfo("Name"); ?></p>
<p class="eC_ItemDescription"><?php echo $CESmith->DisplayInfo("Description"); ?></p></td>
<td class="eC_PriceItem" ><?php echo WA_eCart_DisplayMoney($CESmith, $CESmith->DisplayInfo("Price")); ?></td>
<td class="eC_FormItem" ><?php echo $CESmith->DisplayInfo("Quantity"); ?></td>
<td class="eC_PriceItem" ><?php echo WA_eCart_DisplayMoney($CESmith, $CESmith->DisplayInfo("TotalPrice")); ?></td>
</tr>
<?php
$CESmith->MoveNext();
}
$CESmith->MoveFirst();
?>
</table>
<div class="eC_OrderSummary">
<table border="0" cellpadding="0" cellspacing="0" class="eC_CartSummary">
<?php
//WA eCart Merchandizing Show Start
//ecart="CESmith"
if ($CESmith->GetDiscounts() > 0 || $CESmith->GetCharges() > 0 || $CESmith->GetShipping() > 0 || $CESmith->GetTax() > 0) {
?>
<tr>
<td class="eC_Subtotal eC_SummaryLabel">Sub-total</td>
<td class="eC_Subtotal"><?php echo WA_eCart_DisplayMoney($CESmith, $CESmith->TotalColumn("TotalPrice")); ?></td>
</tr>
<?php
//WA eCart Merchandizing Show End
//ecart="CESmith"
}
?>
<?php
//WA eCart Merchandizing Show Start
//ecart="CESmith"
if ($CESmith->GetDiscounts() > 0) {
?>
<tr>
<td class="eC_SummaryLabel">Discounts</td>
<td>-<?php echo WA_eCart_DisplayMoney($CESmith, $CESmith->GetDiscounts()); ?></td>
</tr>
<?php
//WA eCart Merchandizing Show End
//ecart="CESmith"
}
?><?php
//WA eCart Merchandizing Show Start
//ecart="CESmith"
if ($CESmith->GetCharges() > 0) {
?>
<tr>
<td class="eC_SummaryLabel">Charges</td>
<td><?php echo WA_eCart_DisplayMoney($CESmith, $CESmith->GetCharges()); ?></td>
</tr>
<?php
//WA eCart Merchandizing Show End
//ecart="CESmith"
}
?><?php
//WA eCart Merchandizing Show Start
//ecart="CESmith"
if ($CESmith->GetShipping() > 0) {
?>
<tr>
<td class="eC_SummaryLabel">Shipping</td>
<td><p>&nbsp;</p>
<p>&nbsp;</p></td>
</tr>
<?php
//WA eCart Merchandizing Show End
//ecart="CESmith"
}
?><?php
//WA eCart Merchandizing Show Start
//ecart="CESmith"
if ($CESmith->GetTax() > 0) {
?>
<tr>
<td class="eC_SummaryLabel">Tax</td>
<td><?php echo((isset($_POST["tax"]))?$_POST["tax"]:"") ?></td>
</tr>
<?php
//WA eCart Merchandizing Show End
//ecart="CESmith"
}
?>
<tr class="eC_SummaryFooter">
<td class="eC_SummaryLabel">Total:</td>
<td><?php echo((isset($_POST["mc_gross"]))?$_POST["mc_gross"]:"") ?><?php echo WA_eCart_DisplayMoney($CESmith, $CESmith->GrandTotal()); ?></td>
</tr>
</table>
</div>
<?php
//WA eCart Show If Middle
}
else {
?><table><tr><td>The cart is empty</td></tr></table><?php
//WA eCart Show If End
}
?>
<div class="eC_PurchaserInfoWrapper">
<h3 class="eC_InfoHeader" >PayPal Express Checkout Information</h3>
<div class="eC_InfoContainer" >
<p class="eC_OrderInfo"> <strong class="eC_OrderInfoLabel">PayPal account Name:</strong><?php echo((isset($_POST["address_name"]))?$_POST["address_name"]:"") ?><?php echo WA_PP_ECO_GetValue($WA_PP_ECO_GetResult, "FirstName"); ?>&nbsp;<?php echo WA_PP_ECO_GetValue($WA_PP_ECO_GetResult, "LastName"); ?></p>
<p class="eC_OrderInfo"> <strong class="eC_OrderInfoLabel">PayPal account email:</strong><?php echo((isset($_POST["payer_id"]))?$_POST["payer_id"]:"") ?> <?php echo WA_PP_ECO_GetValue($WA_PP_ECO_GetResult, "PayerID"); ?></p>
</div>
<h3 class="eC_InfoHeader">Shipping Information</h3>
<div class="eC_InfoContainer">
<p class="eC_OrderInfo"><?php echo WA_PP_ECO_GetValue($WA_PP_ECO_GetResult, "Name"); ?><br />
<?php echo WA_PP_ECO_GetValue($WA_PP_ECO_GetResult, "Street1"); ?><br />
<?php echo WA_PP_ECO_GetValue($WA_PP_ECO_GetResult, "Street2"); ?><br />
<?php echo WA_PP_ECO_GetValue($WA_PP_ECO_GetResult, "CityName"); ?>,&nbsp;<?php echo WA_PP_ECO_GetValue($WA_PP_ECO_GetResult, "StateOrProvince"); ?>&nbsp;<?php echo WA_PP_ECO_GetValue($WA_PP_ECO_GetResult, "PostalCode"); ?><br />
<?php echo WA_PP_ECO_GetValue($WA_PP_ECO_GetResult, "Country"); ?></p>
</div>
</div>
</div></td>
</tr>

Thanks

Sign in to reply to this post

Ray BorduinWebAssist

You are referring to:

<?php echo WA_PP_ECO_GetValue($WA_PP_ECO_GetResult, "LastName"); ?>

and not the associated session variable.... you should be adding session variable references to this page, not references to the paypal api.

Sign in to reply to this post

scott362735

I guess that is my problem. I don't know how to add the session variable to this page. Can you give me an example.

It still does not explain why it is not showing the grand total for the order or the shipping charge.

Thanks Ray

Sign in to reply to this post

Ray BorduinWebAssist

For instance... instead of:
<?php echo WA_PP_ECO_GetValue($WA_PP_ECO_GetResult, "LastName"); ?>

It should be:
<?php echo $_SESSION["eCartCheckoutForm_lastname"]; ?>

Instead of:
<?php echo((isset($_POST["tax"]))?$_POST["tax"]:"") ?>

it should be:
<?php echo WA_eCart_DisplayMoney($CESmith, $CESmith->GetTax()); ?>

You can't refer to $_POST or WA_PP_ECO_GetValue on the success page. You need to refer to the cart or session directly.

Sign in to reply to this post

scott362735

Ray,

Thanks for the help on this. For some reason it will not show the shipping costs. It is in the data base and it shows on the confirm page. Just not on the success page. here is the code

<?php
//WA eCart Merchandizing Show Start
//ecart="CESmith"
if ($CESmith->GetShipping() > 0) {
?>
<tr>
<td class="eC_SummaryLabel">Shipping</td>
<td><?php echo WA_eCart_DisplayMoney($CESmith, $CESmith->GetShipping()); ?></td>
</tr>
<?php

Sign in to reply to this post

Ray BorduinWebAssist

It is possible that the shipping value is somehow reset. That code appears as though it should work unless the cart was cleared or a session variable that was used is reset.

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