close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

eCart PayPal Express error: Undefined index: PayPal_ECO_PayerID

Thread began 7/10/2016 1:42 pm by Christopher West | Last modified 7/12/2016 4:08 pm by Ray Borduin | 4089 views | 13 replies |

Christopher WestCommunity Expert

eCart PayPal Express error: Undefined index: PayPal_ECO_PayerID

Hey there, just done a test to add PayPal Express button. and getting errors below (I am also attaching various php files that may be the root of the issue).

The main files for the checkout are:
a) checkout.php (this just collects form data and writes to sessions)
b) checkout-address.php (this just collects form data and writes to sessions)
c) checkout-payment.php (this just collects form data and writes to sessions)
d) confirm-paypal.php (this is the main file that does all the server behaviour magic)
e) failure.php (this just displays the error messages for testing purposes only)

When I do a test order, it goes straight to the failure.php file after around 5 seconds. I never even see the external paypal website.


Notice: Undefined index: PayPal_ECO_PayerID in C:\xampp\htdocs\armadillo\failure.php on line 52

Session PayPal_ECO_PayerID = Notice: Undefined index: PayPal_ECO_PayerID in C:\xampp\htdocs\armadillo\failure.php on line 55

Session PayPal_ECO_Token =
eCart Session ID = 6snajqn213kk1rmvkle9sk7id1
Payer Profile from PayPal Express Checkout

Notice: Undefined variable: WA_PP_ECO_GetResult in C:\xampp\htdocs\armadillo\failure.php on line 63
Notice: Trying to get property of non-object in C:\xampp\htdocs\armadillo\failure.php on line 63
errorCode =Notice: Undefined variable: WA_PP_ECO_GetResult in C:\xampp\htdocs\armadillo\failure.php on line 65
Notice: Trying to get property of non-object in C:\xampp\htdocs\armadillo\failure.php on line 65
errorMessage = Notice: Undefined variable: WA_PP_ECO_GetResult in C:\xampp\htdocs\armadillo\failure.php on line 67
Notice: Trying to get property of non-object in C:\xampp\htdocs\armadillo\failure.php on line 67
Token = Fatal error: Call to undefined function WA_PP_ECO_GetValue() in C:\xampp\htdocs\armadillo\failure.php on line 69

Sign in to reply to this post

Ray BorduinWebAssist

It is failing, so you can't get a result and won't be returning a payer ID. On your failure page just use:

<?php
@session_start();
var_dump($_SESSION);
?>

That will give you the information you need to figure out why it failed.

Sign in to reply to this post
Did this help? Tips are appreciated...

Christopher WestCommunity Expert

Hi, I have posted the error in private message. it seems to be an invalid argument. From the error, is there anything there you notice that could be the cause?

in my php file that does all the processing. I have the following server behaviours:
Gateway Credentials
Get Payer Profile from PayPal Express Checkout
eCart Object
Authentication for PayPal Express Checkout
Process Transaction with PayPal Express

(are the above is all I need for PayPal Express payment?
Does the form need to have an attributes? for example if you ook at my page code that calls the paypal processing file: I am using a redirect

php:
<?php

if(isset($_POST["confirmpaypal"]) || isset($_POST["confirmpaypal_x"])){
    
$WA_Redirect_URL "checkout-paypal.php";
    
$WA_Redirect_KeepQS false;
    if (
$WA_Redirect_URL != "")  {
     if (
$WA_Redirect_KeepQS && $WA_Redirect_URL != "" && isset($_SERVER["QUERY_STRING"]) && $_SERVER["QUERY_STRING"] !== "") {
        
$WA_Redirect_URL .= ((strpos($WA_Redirect_URL'?') === false)?"?":"&").$_SERVER["QUERY_STRING"];
     }
     
header("Location: ".$WA_Redirect_URL);
    }
}
?>


and the form is

[html]<form name="paymentform" class="standard" method="POST">[/html]

I have everything stored in sessions.

Does PayPal require anything else?
Attached Files
checkout-payment.php
checkout-paypal.php
Sign in to reply to this post

Ray BorduinWebAssist

It says: ReturnURL is invalid

So look at what your return url is set to in the paypal authenticate server behavior.

Sign in to reply to this post
Did this help? Tips are appreciated...

Christopher WestCommunity Expert

I will check that, but it doesnt even get to the paypal login screen, surely it would get at least there since the return url is after.

Sign in to reply to this post

Ray BorduinWebAssist

No, it validates that the return url is a valid url syntax before accepting any other arguments. The error message is very clear.

Sign in to reply to this post
Did this help? Tips are appreciated...

Christopher WestCommunity Expert

ok I found because it didnt have the https:/// .... at the beginning... however I now get this error (I know my PayPal account is setup correctly as the WebAssist Checkout wizard test I did the other day worked fine where it was able to redirect to PayPal website.

I am attaching the new error in private message...

Sign in to reply to this post

Ray BorduinWebAssist

Now the error is on the pp_confirm page... it says: Express Checkout PayerID is missing

Is it possible the gateway settings include is too low on the page?

Sign in to reply to this post
Did this help? Tips are appreciated...

Christopher WestCommunity Expert

This is the order of my server behaviours

Gateway Credentials
Get Payer Profile from PayPal Express Checkout
eCart Object
Authentication for PayPal Express Checkout
Process Transaction with PayPal Express

also attaching the file

Sign in to reply to this post

Ray BorduinWebAssist

You shouldn't have Authenticate for Paypal on the same page as a process paypal transaction. If this is the pp_confirm page, remove that server behavior.

Sign in to reply to this post
Did this help? Tips are appreciated...
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...