close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Could you explain this function in detail.....

Thread begun 8/07/2012 7:24 am by Christopher West | Last modified 8/21/2012 8:54 am by Christopher West | 5386 views | 22 replies |

Christopher WestCommunity Expert

Could you explain this function in detail.....

Hi Jason I still getting the odd customer error on the ecart site I built I had sent up an email to send an error notification (the details are blank since the sessions arnt sent..but my main question is to find out what the below code does it detail as Im trying to work out why the customer order fails on the checkout page...I cannot reproduce the problem, so my only option is to learn more about the below snippet of code and try and work that way to capture any problems on the website: I beleive the snippet in question is the DO_itemized part as I dont know what that part details...

$WA_PP_ECO_SetResult = WA_PP_ECO_Set_Post($WA_PP_ECO_Set_params,$WA_PP_ECO_Do_itemized);
if ($WA_PP_ECO_SetResult->isError) {
if ("http://www.dinkyfingerprint.co.uk/failure.php" != "") {
header("Location: ". "http://www.dinkyfingerprint.co.uk/failure.php"); exit;
}
}
else {
$DinkyCart->redirStr = $WA_PP_ECO_SetResult->ECOServer;
}
}
?>




Best regards

Chris

Sign in to reply to this post

Jason ByrnesWebAssist

the WA_PP_ECO_Set_Post() function takes 2 arguments:
1) an array of parameters
2) an array of the items.

In the code block for the code you give, before that is code to set the $WA_PP_ECO_Do_itemized array, and code to set the $WA_PP_ECO_Set_params array

WA_PP_ECO_Set_Post() function passes that information to the paypal server for processing.

If the response from paypal is an error, the user is redirected to the failure page.

Sign in to reply to this post

Christopher WestCommunity Expert

ok thats good to know..when the response from paypal is an error..would that only suggest that the 2 arrays being passed to paypal means that paypal doesnt like whats contained in those arrays...ie if paypal only accepts a certain format for a telephone number (as a simple example) or could paypal somehow process an address and if it doesnt like the address thats filled in it would throw back an error (going to my failure page).

another issue i have with this is that on my checkout page..i thought i had my session variables set properly so the email (which is sent from the failure page via the checkout page doesnt contain the contents of the session variables which are set from the checkout page).

Sign in to reply to this post

Jason ByrnesWebAssist

There are many reasons that the transaction could be failing, you really need to retrieve the response from paypal in order to know what the cause of the failure is.

on the checkout failure page, you can go to the bindings panel, and click the plus button, select eCart -> Checkout -> Local Checkout response.

The gateway list has 2 options for paypal express, select the first one, then report the steps and select the second one.

in each of these binding groups is a full Response binding. This will contain the full failure response form pay pal that contain information about why the transaction failed. Without the full response, it's really just guessing in the dark. the full response will give a solid lead on what to look for.

Sign in to reply to this post

Christopher WestCommunity Expert

Hi Jason, before I added those 2 bindings, I did notice the gateway had 3 options (not 2 that you stated) they were: PayPal Direct Payment, PayPal Authorize Express Checkout and PayPal Process Express Checkout) - Im assuming you meant the *last* 2 options there.

Also before I added these binding groups to my failure.php file I had noticed that there was already a binding group called "Payer Profile from PayPal Express Checkout" - wouldnt this binding group be all that I need rather then adding the 2 binding groups you mentioned - or do they contain totally different information?

I did do a test where I used the defaut binding group already in my failure.php page - the test I carried out involved logging in as a customer, adding an item to my shopping cart then going to checkout, filling in the address details etc and then clicking on the paypal submit button...then on the paypal page I just hand typed in the URL for the failure.php page so that I can see what the email sends me most of the information was blank except:

Error Code: 0
Token: EC-9N717583L8617631C
Payer Status: unverified
Address Status: None
Address Name: Double Print Bookmark

Full Request:
sam_api1.dinkyfingerprint.co.uk6WZ24J8NVCERRA62AUc6cmHJT8hKHAPbBxLj.obnwEEqANATUhuVaR6LjuwCqH.ogBdmXIQ863.0EC-9N717583L8617631C

Full Response:
2012-08-08T00:01:49ZSuccessfd8da2633f07963.03386080EC-9N717583L8617631Cunverified
PayPalNone
80.0073.007.000.000.00PayPalNoneDouble Print Bookmark6010.0073.000.000.00falsePaymentActionNotInitiated

Then it contained my session variables I set for the email on the failure.php page which includes my full postal address, email address and phone number.

So has any of the above shed any light to understanding more on how a customer would get to the failure page? I did note that for the ADDRESS NAME it contained information for the product item i had in the cart which I found was a bit odd.

obviously most orders go through, so i cant see how that would cause errors. Even Ray kindly performed an order test himself and he stated that was successful.

I know I cheated in my test by going to the failure page directly after paypal page but obviously I cannot reproduce the problem that some customers are getting. (I have left it so that if a realtime customer does get an error I will be automatically informed via an email with all the above information.

also i do sometimes get an order failure email where there are NO customer address details or email address or phone number etc which would suggest that the session variables arnt being set therefore arnt being passed onto the email template i created on the failure page. so that would suggest the error ALSO happens before the paypal page i assume.

any thoughts on what I have given?

Chris

Sign in to reply to this post

Jason ByrnesWebAssist

  before I added those 2 bindings, I did notice the gateway had 3 options (not 2 that you stated) they were: PayPal Direct Payment, PayPal Authorize Express Checkout and PayPal Process Express Checkout) - Im assuming you meant the *last* 2 options there.  



In my reply i said "2 options for paypal express". The first one you mention is for Direct paymant, the other 2 are for paypal express. You are using Express checkout, so the binding group for Direct Payment doesnt apply to you.

  Also before I added these binding groups to my failure.php file I had noticed that there was already a binding group called "Payer Profile from PayPal Express Checkout" - wouldnt this binding group be all that I need rather then adding the 2 binding groups you mentioned - or do they contain totally different information?  



they contain completely different information and relate to different parts of the checkout experience.

The way express checkout works is to pass the transaction information to paypal, the user selects the payment method and is then directed back to your site where they can select to process the transaction.

there are 2 places for the failure to occur, thus the need for the 2 binding groups

Without seeing the full request and response of a failed transaction, I really cant say what the cause of the failure is, the full response from paypal on failure is needed in order to troubleshoot, without that information I cant give any answers.

Sign in to reply to this post

Christopher WestCommunity Expert

HI Jason. I am stupid as after thinking about the logic. for me to manually go to the failure.php page after paypal wouldnt work as a test since there would have been no error...I have added the 2 binding groups to my failure.php page and now I wait for a customer to run into a transaction error...maybe sometime though as I have noticed recently other transactions go through fine (and thats from UK, Australia and USA).

It really is baffling me this problem as I so want to know the reason. It just doesnt make sense that some transactions go through and others dont...Im wondering if its to do with the customer browser set up (perhaps they not using a desktop, who knows why).

The only other problem is that when I do get the order failure email sometimes the customer details are blank (and I know it has to do with the session variables not being passed as I use the session variables in the email) - but sometimes these sessions variables are being passed so in other words it seems there are two directions the failure page gets to...now since I set the session variables on the checkout page (since this is where the customer types in their address details) the session would be set once the form is submitted..but once its submitted it woulf leave the page and go to the paypal page...so if the session variables are not being passed to my failure email then that would suggest the session dosnt even get passed posting from the checkout page. I even did a test whereupon I left all of the checkout page form fields blank and that still allowed me to get to the paypal page, so I know it has nothing to do with correct form fields being filled out.

I am wondering if the failure page doesnt get passed the form posting on the checkout page, can I still somehow set the session variables from the fields the customer fills out...or does it need to form post before since the sessions variables relate to the form contents?

Sign in to reply to this post

Jason ByrnesWebAssist

  now since I set the session variables on the checkout page (since this is where the customer types in their address details)  




normally when using express checkout, it would be done in conjunction with Direct Payments.

on the checkout page, there is normally a checkout with paypal express button, then a separate form where the user can enter their information to checkout with Direct Payment, this second form passes to the confirm page to set the session variables.

The checkout with express checkout form would only contain the express checkout button and does not send any of the information that would be entered, it not supposed to.

The user would go to paypal, enter the billing information, then this information is sent to the pp_confrm page, only on the pp confirm page are the sessions set.

you are correct that there are 3 ways for the failure to happen:
1) on sending the user to the paypal side - this is why we need the PayPal Authorize Express Checkout bindings
2) directing from paypal to your site - this is why we need the Get Payer Profile from PayPal Express Checkout
3) On processing the order - this is why we need the PayPal Process Express Checkout bindings

on the failures that are happening where there are no session set, that would be happening on either passing the user to the paypal site, or on getting the payer profile.

the failures that happen where the sessions are set will happen on processing the transaction.

Sign in to reply to this post

Christopher WestCommunity Expert

Hey Jason, now this is all very helpful in understanding the process, you are being brilliant in explaining this to me.

On the checkout page I had placed a form for address details since I wanted the customer to have the option to send to a different address for delivery if needed...plus once order gone through the first time it would store the address details to a customer file if they decide to come back and place a second order at a later date..and in addition I created the option for the customer to have multiple stored delivery addresses which they can select which one is default in their customer area (a bit like how Amazon website does it) Hence why I did all that on the checkout page since I also put an option to chose delivery cost method (collect in store, first class delivery and so on) I felt it was more organsied that way and using the confirm page as an order summary page.

I am not thinking maybe talk to the client and to scrap all that and just have the delivery address form on the confirm page (perhaps this would make the ordering process more robust and possible prevent the order errors that sometimes happen..even though i dont know how those order errors are occuring).

What are your thoughts in my reasoning of a different approach in this situation?

Sign in to reply to this post

Jason ByrnesWebAssist

So somewhere in the customization of the ordering process, is where the issue lies.

it is probably when selecting shipping addresses that the problem occurs or somewhere else down the line.

In reality, this sort of shipping address selection is not intended for use with Paypal express Checkout.

With Express checkout, the user goes to the paypal site. they enter the billing and shipping address there and they are then directed to your site to either cancel or process the the order.

The shipping address is set on paypals site and should not be changed after words.

if you wanted to create the type of system you are talking about, you should be using Payments pro, not express checkout.

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