Jump to content
Sign in to follow this  
devosc

[Contribution]Paypal IPN - Devosc

Recommended Posts

Fatal error: Call to undefined function: paypal_reset_checkout_cart_session() in /var/www/html/checkout_success.php on line 32

Eric,

 

For some reason you are not able to access catalog/includes/modules/payment/paypal/classes/paypal_order.class.php which is where that function is declared. Your checkout_successfile should be calling it as:

 

 

paypal_order::reset_checkout_cart_session().

 

 

Hmmm... In rereadin your quote I notice you may have entered the above as paypal_reset_checkout_cart_session. Well check that line in your checkout_sucess.php file and make sure it is as listed above.

Share this post


Link to post
Share on other sites

Fatal error: Call to undefined function: paypal_reset_checkout_cart_session() in /var/www/html/checkout_success.php on line 32

Eric,

 

For some reason you are not able to access catalog/includes/modules/payment/paypal/classes/paypal_order.class.php which is where that function is declared. Your checkout_successfile should be calling it as:

 

 

paypal_order::reset_checkout_cart_session().

 

 

Hmmm... In rereadin your quote I notice you may have entered the above as paypal_reset_checkout_cart_session. Well check that line in your checkout_sucess.php file and make sure it is as listed above.

Ok. That fixed the problem. But now when I get back to my site from the paypal site the order does not go through even though the cart is emptied and the money is sent. What could the problem be?

 

 

 

Eric

Share this post


Link to post
Share on other sites

sounds like Cocaberry and me have the same problem now

 

and no I have not recived any degug emails from the trasactions that appeard to go through ok, ones that were purposly faulted I did...

 

in my case it is like the IPN info from paypal is never reported but everything else with the transaction goes fine

 

and the Test works now for me(in IE only still will not work in Firefox for some reason, have not investigated why, I will do that after I get it to work in the catalog)

Edited by The_ancient

Share this post


Link to post
Share on other sites

I just setup some test accounts on paypal's sandbox and tried things out and got the ipn ok, as mentioned above had to change the url to www.sandbox.paypal.com this was done in catalog/includes/modules/payment/paypal.php and then the module needs to be reinstalled via osC->admin.


"Any fool can know. The point is to understand." -- Albert Einstein

Share this post


Link to post
Share on other sites
I just setup some test accounts on paypal's sandbox and tried things out and got the ipn ok, as mentioned above had to change the url to www.sandbox.paypal.com this was done in catalog/includes/modules/payment/paypal.php and then the module needs to be reinstalled via osC->admin.

well I edited the database direct to reflect the chagse, I still have to tet with sandbox, which i will after work today

Share this post


Link to post
Share on other sites

STS & PayPal_Shopping_Cart_IPN_v2.6,

 

I tried installing the new Paypal there are a few new changes to the code in

 

account_history_info.php,

checkout_success.php.

 

which breaks the STS. I would assume that there would need to be new mods to work arround the files ***.inc.php

Edited by RI Downlink

I'm not a coder just a splicer.

Share this post


Link to post
Share on other sites

Hi Jimmie,

 

I don't use STS, are you getting any error messages?


"Any fool can know. The point is to understand." -- Albert Einstein

Share this post


Link to post
Share on other sites
STS & PayPal_Shopping_Cart_IPN_v2.6,

 

I tried installing the new Paypal there are a few new changes to the code in

 

account_history_info.php,

checkout_success.php.

 

which breaks the STS. I would assume that there would need to be new mods to work arround the files ***.inc.php

Jimmie,

 

In regard to the checkout_success.php error try changing:

 

 

paypal_order::reset_checkout_cart_session();

 

to:

 

$paypal_order->reset_checkout_cart_session();

 

 

I tested it using BTS and it works since paypal_order is registered in the session. I could be wrong about the above but it seems that that is the line causing trouble for STS in there.

 

In account_history_info the section that cuses trouble would be I believe as follows:

 

require(DIR_WS_MODULES . 'payment/paypal/catalog/order_send_money.inc.php');

 

I have not followed the code all the way through so I'm not sure if there is a similar thing going on there. Now keep in mind I have no clue if what I mentioned above will realy solve the problem, it's just a guess.

Share this post


Link to post
Share on other sites

Jimmie,

 

Oh if the above fails please check your sessions table, after you click the confirm order button and a directed to paypal, to see if paypal_order is stored in the memo field with the rest of the session information. I have noticed at times with BTs things that ihave registered in the session dont "stick".

Share this post


Link to post
Share on other sites

Greg,

No error messages, but it is in order history it is pop opening a new page with distorted text (no tie to the css). In checkout_process I never get to the Paypal page but I do get an email "pending paypal" etc.

 

I figured I would post it in case someone resolves it, I also posteded the problem in the STS support forum.

I have a good feeling that the STS is not capturing the ***.inc.php or the new classes and need to be tweaked, Paypal 2.5a is fine using the STS.

 

I realy like the info_paypal and thanks again for the catalog edit files it gets kind of crazy when you have to delete old stuff when it is not applied to a new release.

 

I also change version titles ex.

//begin PayPal_Shopping_Cart_IPN

to

//begin PayPal_Shopping_Cart_IPN_2.6 etc.

 

it helps me locate changes and compare to the previous install when there is a lot of updates to a contribution.

 

if possible can you email me the 2.5a catalog edits if you have it handy

 

Thanks again for your hard work it always keeps getting better.

 

Jimmy


I'm not a coder just a splicer.

Share this post


Link to post
Share on other sites

Getting closer with the STS

 

any insight to this error,

 

1054 - Unknown column 'firstname' in 'field list'

 

insert into orders_session_info (sendto, billto, firstname, lastname, language, currency, content_type, txn_signature, orders_id) values ('6', '6', 'john', 'doe', 'english', 'USD', 'physical', '604f32f42446af7d9beb60e4ec01bd55', '2')

 

[TEP STOP]


I'm not a coder just a splicer.

Share this post


Link to post
Share on other sites
Did you get a debug email?

No I don't get any debug emails or anything. And I think that the IPN doesnt go through either. Its hard to tell though when the order doesnt go through and the IPN relies on the order.

 

 

 

Eric

Share this post


Link to post
Share on other sites

You do have your Primary Email and Business ID configured correctly? see FAQ.


"Any fool can know. The point is to understand." -- Albert Einstein

Share this post


Link to post
Share on other sites

Hi,

 

I just downloaded 14 Jul 2004 - v2.6 and there are no install instructions..? :(

 

Where can I get them?

 

Thanks,

Gina

Share this post


Link to post
Share on other sites

When you unzip the package, PayPal_Shopping_Cart_IPN.html is the install/readme docs.


"Any fool can know. The point is to understand." -- Albert Einstein

Share this post


Link to post
Share on other sites
You do have your Primary Email and Business ID configured correctly? see FAQ.

Yes I do. But do these accounts need to be mirrored on the sandbox site? I didnt do that yet.

 

 

Eric

Share this post


Link to post
Share on other sites

Jimmie, don't think I have the edits for 2.5a, their only difference between 2.6 is in catalog/ipn.php and paypal/classes/ipn.class.php, so should be no noticeable effect.

 

In regard to the info_paypal.php page I hacked some text from the paypal site and added the wording Bob Visibone used, however I noticed that the extracted paypal wording is still merchant orientated, eg:

PayPal has optimized the checkout experience by launching an exciting new improvement to its payment flow.

 

For new buyers, signing up for a PayPal account is now optional. This means your customers can complete their payments first, and then decide whether to save their information for future purchases

Should probably be changed to:

PayPal has optimized their checkout experience by launching a new improvement to its payment flow.

 

For new buyers, signing up for a PayPal account is now optional. This means customers can complete their payments first, and then decide whether to save their information for future purchases

Eg, just remove merchant type reference to customers.

 

Cockaberry,

If I can recall from my test, in the sandbox.paypal doamin create a virtual business account. Now use this account email address as the Primary and Business ID, and point the script to www.sandbox.paypal.com. I then went through and made a purchase with a virtual premier/normal account user (also created via the sandbox.paypal domain).

Edited by gregbaboolal

"Any fool can know. The point is to understand." -- Albert Einstein

Share this post


Link to post
Share on other sites
I have a good feeling that the STS is not capturing the ***.inc.php? or the new classes and need to be tweaked, Paypal 2.5a is fine using the STS.

 

 

I keep typing 2.5a I mean 2.4.

2.4 is the latest version that works with the STS

 

 

You said that somtimes Paypal does not show in the checkout. I think I found how to reproduce the problem, but I don't know why.

 

Since I am on a local machine if I run the your paypal_ipn.sql I loose paypal at checkout.

 

If I restore a back up site with v2.4 then just do the sql edits paypal shows up in the checkout. This happens with v2.6 only.

Edited by RI Downlink

I'm not a coder just a splicer.

Share this post


Link to post
Share on other sites
If I can recall from my test, in the sandbox.paypal doamin create a virtual business account. Now use this account email address as the Primary and Business ID, and point the script to www.sandbox.paypal.com. I then went through and made a purchase with a virtual premier/normal account user (also created via the sandbox.paypal domain).

Ok. I did all this and tested the contrib and it works perfectly. Thanks for the help!! :)

 

 

Eric

Share this post


Link to post
Share on other sites

Is there someway to force the buyer to choose a verified address from their paypal account so I (the seller) can be protected by the paypal seller protection policy?

 

 

 

Eric

Share this post


Link to post
Share on other sites
If I restore a back up site with v2.4 then just do the sql edits paypal shows up in the checkout. This happens with v2.6 only.

In catalog/includes/modules/payment/paypal/catalog/checkout_spalsh.inc.php try changing

require(DIR_WS_INCLUDES . 'application_bottom.php');
To:
require(DIR_WS_MODULES . 'payment/paypal/application_bottom.inc.php');

 

How about info_paypal.php does this work as is?


"Any fool can know. The point is to understand." -- Albert Einstein

Share this post


Link to post
Share on other sites

Hi All, figured out why the module wasn't showing up straight away upon install, this was because I was initially using a version which which was utilizing the PayPal payment zone contrib.

 

To get it back to its normal state in catalog/includes/modules/payment/paypal.php, look for

'MODULE_PAYMENT_PAYPAL_ZONE', '2', 'If a zone is selected
and change to
'MODULE_PAYMENT_PAYPAL_ZONE', '0', 'If a zone is selected

"Any fool can know. The point is to understand." -- Albert Einstein

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×