close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

confirm page missing something?

Thread began 4/11/2010 9:49 pm by rdicroce404569 | Last modified 4/13/2010 9:59 am by Jason Byrnes | 1144 views | 3 replies |

rdicroce404569

confirm page missing something?

I noticed that paypal pro works great but shipping last name does not show up on paypal website. Just shipping first name. I am including block of code from my confirm.php

$tvdcart->MoveFirst();
$nextIndex = count($PP_DirectPayment_optional[0]);
$PP_DirectPayment_optional[0][$nextIndex] = "MerchantSessionID";
$PP_DirectPayment_optional[1][$nextIndex] = "".session_id() ."";
$nextIndex = count($PP_DirectPayment_optional[0]);
$PP_DirectPayment_optional[0][$nextIndex] = "Payer";
$PP_DirectPayment_optional[1][$nextIndex] = "".((isset($_POST["email"]))?$_POST["email"]:"") ."";
$nextIndex = count($PP_DirectPayment_optional[0]);
$PP_DirectPayment_optional[0][$nextIndex] = "Street2";
$PP_DirectPayment_optional[1][$nextIndex] = "".((isset($_POST["street2"]))?$_POST["street2"]:"") ."";
$nextIndex = count($PP_DirectPayment_optional[0]);
$PP_DirectPayment_optional[0][$nextIndex] = "Phone";
$PP_DirectPayment_optional[1][$nextIndex] = "".((isset($_POST["phone"]))?$_POST["phone"]:"") ."";
$nextIndex = count($PP_DirectPayment_optional[0]);
$PP_DirectPayment_optional[0][$nextIndex] = "CVV2";
$PP_DirectPayment_optional[1][$nextIndex] = "".((isset($_POST["cvv"]))?$_POST["cvv"]:"") ."";
$nextIndex = count($PP_DirectPayment_optional[0]);
$PP_DirectPayment_optional[0][$nextIndex] = "ItemTotal";
$PP_DirectPayment_optional[1][$nextIndex] = "".$tvdcart->TotalColumn("TotalPrice") ."";
$nextIndex = count($PP_DirectPayment_optional[0]);
$PP_DirectPayment_optional[0][$nextIndex] = "ShippingTotal";
$PP_DirectPayment_optional[1][$nextIndex] = "".$tvdcart->GetShipping() ."";
$nextIndex = count($PP_DirectPayment_optional[0]);
$PP_DirectPayment_optional[0][$nextIndex] = "HandlingTotal";
$PP_DirectPayment_optional[1][$nextIndex] = "".$tvdcart->GetCharges() - $tvdcart->GetDiscounts() ."";
$nextIndex = count($PP_DirectPayment_optional[0]);
$PP_DirectPayment_optional[0][$nextIndex] = "TaxTotal";
$PP_DirectPayment_optional[1][$nextIndex] = "".$tvdcart->GetTax() ."";
$nextIndex = count($PP_DirectPayment_optional[0]);
$PP_DirectPayment_optional[0][$nextIndex] = "SH_Name";
$PP_DirectPayment_optional[1][$nextIndex] = "".((isset($_POST["shipping_firstname"]))?$_POST["shipping_firstname"]:"") ."";
$nextIndex = count($PP_DirectPayment_optional[0]);
$PP_DirectPayment_optional[0][$nextIndex] = "SH_Street1";
$PP_DirectPayment_optional[1][$nextIndex] = "".((isset($_POST["shipping_street1"]))?$_POST["shipping_street1"]:"") ."";
$nextIndex = count($PP_DirectPayment_optional[0]);
$PP_DirectPayment_optional[0][$nextIndex] = "SH_Street2";
$PP_DirectPayment_optional[1][$nextIndex] = "".((isset($_POST["shipping_street2"]))?$_POST["shipping_street2"]:"") ."";
$nextIndex = count($PP_DirectPayment_optional[0]);
$PP_DirectPayment_optional[0][$nextIndex] = "SH_CityName";
$PP_DirectPayment_optional[1][$nextIndex] = "".((isset($_POST["shipping_city"]))?$_POST["shipping_city"]:"") ."";
$nextIndex = count($PP_DirectPayment_optional[0]);
$PP_DirectPayment_optional[0][$nextIndex] = "SH_StateOrProvince";
$PP_DirectPayment_optional[1][$nextIndex] = "".((isset($_POST["shipping_state_province"]))?$_POST["shipping_state_province"]:"") ."";
$nextIndex = count($PP_DirectPayment_optional[0]);
$PP_DirectPayment_optional[0][$nextIndex] = "SH_PostalCode";
$PP_DirectPayment_optional[1][$nextIndex] = "".((isset($_POST["shipping_postcode"]))?$_POST["shipping_postcode"]:"") ."";
$nextIndex = count($PP_DirectPayment_optional[0]);
$PP_DirectPayment_optional[0][$nextIndex] = "SH_Country";
$PP_DirectPayment_optional[1][$nextIndex] = "".((isset($_POST["shipping_country"]))?$_POST["shipping_country"]:"") ."";
$nextIndex = count($PP_DirectPayment_optional[0]);
$PP_DirectPayment_optional[0][$nextIndex] = "SH_Phone";
$PP_DirectPayment_optional[1][$nextIndex] = "".((isset($_POST["shipping_phone"]))?$_POST["shipping_phone"]:"") ."";


What should I add or change here to get shipping last name to transfer to paypal as it appears the shipping_lastname needs to go somewhere.

Thanks again.

Sign in to reply to this post

Jason ByrnesWebAssist

try changing:

php:
$PP_DirectPayment_optional[0][$nextIndex] = "SH_Name";

$PP_DirectPayment_optional[1][$nextIndex] = "".((isset($_POST["shipping_firstname"]))?$_POST["shipping_firstname"]:"") ."";



to:

php:
$PP_DirectPayment_optional[0][$nextIndex] = "SH_Name";

$PP_DirectPayment_optional[1][$nextIndex] = "".((isset($_POST["shipping_firstname"]))?$_POST["shipping_firstname"]:"") ." ".((isset($_POST["shipping_lastname"]))?$_POST["shipping_lastname"]:"") ."";
Sign in to reply to this post

rdicroce404569

added code caused transaction failure

Thanks for quick reply.

I replaced code as suggested and transaction failed. Removed code and transaction processed successfully.

Any other thoughts. Thank you.

Sign in to reply to this post

Jason ByrnesWebAssist

add the following code to the failure page so we can investigate why it fails with that code:

php:
<?php 

echo "Full Request: ".(isset($_SESSION["PP_DirectPayment_postedValues"])?htmlentities($_SESSION["PP_DirectPayment_postedValues"]):"n/a")."<br />";  
     echo 
"Full Response: ".(isset($_SESSION["PP_DirectPayment"])?htmlentities($_SESSION["PP_DirectPayment"]):"n/a")."<br /></p>";  
?>




that code only concatenates the first name and last name together, the shipping name field has a limitation of 32 characters, so really the only reason I can think of for that code to cause it to fail is if the first and last name together where more than 32 characters.

Sign in to reply to this post

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