close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Paypal Express Checkout

Thread began 3/31/2010 4:35 pm by jebrandon343719 | Last modified 4/09/2010 2:52 pm by Eric Mittman | 3321 views | 11 replies |

jebrandon343719

Paypal Express Checkout

Hi, I have my settings to use Paypal express. In the cart page I get the paypal logo and option, however when i select this i go to the confirm page?? Is this the correct page flow?

Also, on the confirm page I get the Paypal express option as well as enter cc details.
If I select to pay by paypal on confirm page, i end up on pp_checkout_failure.php

I am sure my settings are correct and I have the correct Paypal API??

I am confused, can you please explain. Thanks

Sign in to reply to this post

Eric Mittman

The flow of the checkout when using Express Checkout only should be that the user goes to the cart and clicks on the checkout with PayPal button. The user should then be sent to PayPal to login and confirm their info, when they do they will be sent back to the confirm page. You should then have the option to confirm the details of the transaction and it will then process the transaction and send the user to either the pp_checkout_success or the pp_checkout_failure page depending on the status of the transaction.

What you have described seems to differ from this. Are you using the Express Checkout only option within the store? Have you modified any of the checkout pages with eCart anywhere along the way?

Sign in to reply to this post

jebrandon343719

Express only

Hi and thanks,

I have 'PayPal Express only' selected. I havent touched the code of any of these pages - just added some styling.
I did have a bit of fun setting up the database. I created it, then had to move data from my testing site. maybe I have something missing here.

I have attached the ws-settings table, if you'd like to have a look.

Sign in to reply to this post

Eric Mittman

Well you should not see the checkout form when you click on the PayPal button. If you can please post back with a copy of your cart page so we can take a look at this. As for going directly to the failure page when you click on the PayPal button on the checkout page there must be some error occurring with the api call that is being made. On your failure page you should add in this code:

php:
<?php  

if(!session_id()) session_start();   
echo(
"Direct Pay Full Request :<br />");  
echo(
"<code>".isset($_SESSION["PP_DirectPayment_postedValues"])?$_SESSION["PP_DirectPayment_postedValues"]:""."</code><br /><br />");  
echo(
"Direct Pay Full Response :<br />");  
echo(
"<code>".isset($_SESSION["PP_DirectPayment"])?$_SESSION["PP_DirectPayment"]:""."</code><br /><br />"); 
echo(
"PayPal Express Checkout requests and responses :<br />");   
echo(
"Auth request: ".isset($_SESSION['ECO_Auth_Request'])?$_SESSION['ECO_Auth_Request']:""."<br /><br />");  
echo(
"Auth Result: ".isset($_SESSION['"ECO_Auth_Result'])?$_SESSION['ECO_Auth_Result']:""."<br /><br />");  
echo(
"Get Request: ".isset($_SESSION['ECO_Get_Request'])?$_SESSION['ECO_Get_Request']:""."<br /><br />");  
echo(
"Get Result: ".isset($_SESSION['ECO_Get_Result'])?$_SESSION['"ECO_Get_Result']:""."<br /><br />");  
echo(
"Preocess request: ".isset($_SESSION['"ECO_Process_Request'])?$_SESSION['ECO_Process_Request']:""."<br /><br />");  
echo(
"Process Result: ".isset($_SESSION['ECO_Process_Result'])?$_SESSION['ECO_Process_Result']:""."<br /><br />");  
?>



This will let you know what values are being sent and returned from PayPal through the API call. Please post back with this info, also I removed your db posting for security reasons.

Sign in to reply to this post

jebrandon343719

Thanks

Hi Eric, Thats for removing zip !!

This is what the code you gave me produced (after checkout page)
Direct Pay Full Request :
Direct Pay Full Response :
PayPal Express Checkout requests and responses :
ddddddd_api1.ozemail.com.auxxxxxxxxxxxxxxxssssssssssssssss2.2072.00http://amun.webcity.com.au/~gol30910/pp_confirm.phphttp://amun.webcity.com.au/~gol30910/pp_cancel.phpAuthorizationssssssssssssssssssssss2010-04-02T01:01:06ZFailure496c082745060Transaction refused because of an invalid argument. See additional error messages for details.Currency is not supported10605Error2.201247606


I think the api and signiture are okay - I have removed them above - replaced with dddd/xxx/sss
Attached is Cart page etc.

Sign in to reply to this post

Eric Mittman

I think that I can see both issues when I check on your checkout page. The error you are getting is letting you know that the currency code is not set correctly. Rite now on line 119 you have it set to AU, it needs to be set to AUD to work properly. Here is a link to the currency codes that PayPal uses:

e_howto_api_nvp_currency_codes

As for the issue with it not going directly to PayPal when you click on the button from your cart page this is occurring because the trigger on your checkout page for the Express Checkout is not setup correctly. Have you modified the Authentication for PayPal Express Checkout server behavior that is on this page? The reason I ask is because your trigger for this server behavior does not look like the one that is on my default page. On your checkout page you should update what is currently on line 101 with this line of code:

php:
if (isset($_GET['ExpressCheckout']) || ($_SERVER["REQUEST_METHOD"] == "POST") && (isset($_SERVER["HTTP_REFERER"]) && strpos(urldecode($_SERVER["HTTP_REFERER"]), urldecode($_SERVER["SERVER_NAME"].$_SERVER["PHP_SELF"])) > 0) && isset($_POST))  {



This should make it so you go directly to PayPal when you click on the checkout button from the cart page. I also removed your posted files as they contained some info about your PayPal account.

Sign in to reply to this post

jebrandon343719

Working

Thanks Eric, that worked. I did open the server behaviour - to change currency. Must have modified the trigger whilst I was there.

Thanks so much.

Sign in to reply to this post

Eric Mittman

You are very welcome, I'm glad that you got it worked out.

Sign in to reply to this post

jebrandon343719

Another question

Hi Eric, I have been successful in linking to paypal, however, I am not sure I am getting the correct response. When the pp_confirm.php loads, there is no Paypal Check out info, nor is there any shipping info.

It would appear that this code (below) has no value

<p class="eC_OrderInfo"><?php echo WA_PP_ECO_GetValue($WA_PP_ECO_GetResult, "FirstName"); ?> <?php echo WA_PP_ECO_GetValue($WA_PP_ECO_GetResult, "MiddleName"); ?> <?php echo WA_PP_ECO_GetValue($WA_PP_ECO_GetResult, "LastName"); ?><br />
<?php echo WA_PP_ECO_GetValue($WA_PP_ECO_GetResult, "Payer"); ?><br />
<?php echo WA_PP_ECO_GetValue($WA_PP_ECO_GetResult, "PayerCountry"); ?><br />
</p>

Is this correct??

Sign in to reply to this post

Eric Mittman

I have seen two other reports of this happening, the solution for the others was to reapply the Express Checkout server behaviors using eCart. Here is a link to a thread with the details for this:

showpost.php?p=52990&postcount=31

Please give the steps in this post a try to see if it fixes the issue you are experiencing, if not post back and let us know.

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