Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Sign in to follow this  
devosc

[Contribution]Paypal IPN - Devosc

Recommended Posts

fresco,

 

Free shipping does work - there is no charge for downloadable media.

 

Greg,

 

you missunderstood,

 

I know about downloadable. what i was referring to is the product that weighs 20LB and costs $20 to ship which I gave customer for free and was unticipating to get paid for shipping - this shipping charge was passed to PayPal but was not added unless i would enter other than 0 for the subtotal.

Share this post


Link to post
Share on other sites
Greg,

 

you missunderstood,

 

I know about downloadable. what i was referring to is the product that weighs 20LB and costs $20 to ship which I gave customer for free and was unticipating to get paid for shipping - this shipping charge was passed to PayPal but was not added unless i would enter other than 0 for the subtotal.

 

So your saying the product cost $0.00 and shipping cost $20.00? I don't think PayPal would process this unless the product cost something, say $1.00.

 

The total amount passed to PayPal is ($order->['total'] - $order->['shipping_cost']), this is standard.

 

Without seeing the process/transaction being reffered to here, I would of thought it easier to just login to PayPal and do a SendMoney request.

 

Although an alternative could be to force the shipping_cost to become the total amount passed to PayPal IF $order->sub_total is zero.

 

 

Fireman, theres no easy way to upgrade from 2.4, 2.8 would be worth the upgrade, although I would consider it as more like starting from scratch.


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

Share this post


Link to post
Share on other sites
So your saying the product cost $0.00 and shipping cost $20.00? I don't think PayPal would process this unless the product cost something, say $1.00.

 

The total amount passed to PayPal is ($order->['total'] - $order->['shipping_cost']), this is standard.

 

Without seeing the process/transaction being reffered to here, I would of thought it easier to just login to PayPal and do a SendMoney request.

 

Although an alternative could be to force the shipping_cost to become the total amount passed to PayPal IF $order->sub_total is zero.

.

 

Greg, is this not another example of a problem that might be solved by using the aggregate mode?

 

David

Share this post


Link to post
Share on other sites
Guest
Fireman, theres no easy way to upgrade from 2.4, 2.8 would be worth the upgrade, although I would consider it as more like starting from scratch.

 

Ok, great! I'll tackle that & see if it fixes my problem with the gift certificates...

Share this post


Link to post
Share on other sites

Any one can help me.. Read thru the thread for hrs, until headaches. My poor english.. I just want to solve one of the following problem:

Follow this-->

 

 

Confirm order--Expected

 

 

1.gif

 

 

 

Go to Sandbox.paypal--.Good

 

 

2.gif

 

 

Paid-->

 

 

3.gif

 

 

Transaction done @ sandbox

 

 

5.gif

 

6.gif

 

BUT

 

 

7.gif

 

 

and

 

 

8.gif

 

Thanks in advance..多谢

Edited by yongxin

Share this post


Link to post
Share on other sites

Hi yongxin,

 

It's a bit hard for me to go quickly through the whole process again, theres plenty of info in this thread

 

However, first try the IPN Test Panel, and maked sure that the IPN and orders are being processed properly, since in test mode nothing will prevent the order from being updated.

 

If everything is ok you should then be able to test in live mode, either via PayPal's Sandbox or www.paypal.com, if things stop working here then it is because your Primary Email Address and or Business ID is not configured properly, see the FAQs for more info.

 

Regards,

Greg.


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

Share this post


Link to post
Share on other sites
If you try the IPN Test Panel and just get a blank white screen then in paypal/application_top.inc.php uncomment the error_reporting offf.

 

Also have a look at catalog/ipn.php at the top there is some commented code for a debugWriteFile function uncomment it and place a chmod 777 ipn.txt in the catalog root.

hi, Greg.

Do you mean change

 

// set the level of error reporting
// ? ?error_reporting(E_ALL & ~E_NOTICE);
? ?error_reporting(0);

 

to this:

 

// set the level of error reporting
? ?error_reporting(E_ALL & ~E_NOTICE);
?error_reporting(0);

 

but i still got blank tsting page

 

also nothing in table paypal..

Edited by yongxin

Share this post


Link to post
Share on other sites
Guest

I just installed v2.9 & I'm getting these errors on orders that where previously placed on the old version.

 

1054 - Unknown column 'p.paypal_id' in 'on clause'

 

select p.payment_status from paypal p left join orders o on p.paypal_id = o.payment_id where o.orders_id ='22'

 

I'm not sure what I need to change to get these errors to go away. Anyone have a suggestion?

 

Thanks

Share this post


Link to post
Share on other sites
Guest
1054 - Unknown column 'firstname' in 'field list'

 

insert into orders_session_info (sendto, billto, firstname, lastname, payment, payment_title, payment_amount, payment_currency, payment_currency_val, language, language_id, currency, currency_value, content_type, txn_signature, orders_id) values ('4', '4', 'Joel Test', 'Gallant', 'paypal', 'PayPal', '11.57', 'CAD', '1.00000000', 'english', '1', 'CAD', '1.00000000', 'mixed', 'b614582afcc2afb9d98bcfa816de1faa', '30')

 

[TEP STOP]

 

 

Ok, I'm also getting this error.

 

I've searched my db to try to figure it out, but I'm stumped....

Share this post


Link to post
Share on other sites

yongxin,

// set the level of error reporting
   error_reporting(E_ALL & ~E_NOTICE);
//    error_reporting(0);

 

Fireman, which sql script did you run, if migrating from 2.4 etc, then you should just run paypal.sql.


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

Share this post


Link to post
Share on other sites
So your saying the product cost $0.00 and shipping cost $20.00? I don't think PayPal would process this unless the product cost something, say $1.00.

 

The total amount passed to PayPal is ($order->['total'] - $order->['shipping_cost']), this is standard.

 

Without seeing the process/transaction being reffered to here, I would of thought it easier to just login to PayPal and do a SendMoney request.

 

Although an alternative could be to force the shipping_cost to become the total amount passed to PayPal IF $order->sub_total is zero.

Fireman, theres no easy way to upgrade from 2.4, 2.8 would be worth the upgrade, although I would consider it as more like starting from scratch.

 

is there a possibility do do something like (i am not a coder!!!):

 

if $order->['total'] = 0 - $order->['total'] + 0.10

$order->['total'] - $order->['shipping_cost']),

 

 

 

Nimitz_1061

 

i am using aggregate mode

Share this post


Link to post
Share on other sites

I still don't understand whats happening, and you didn't confirm or comment on my last post, e.g what I'm assuming the problem maybe.

 

0.10, whats the significance of this?


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

Share this post


Link to post
Share on other sites
I still don't understand whats happening, and you didn't confirm or comment on my last post, e.g what I'm assuming the problem maybe.

 

is the above addressed to me?

 

0.10, whats the significance of this?

 

0.10 will add 10 cents (service fee) to a 0 cost order therefor PayPal will pocess the shipping for that order correctly.

 

PS. this will is for not to have problem with someone accumulating enough discounts to get a product free. - my products are heavy and I do not want to ship them free...

 

Scenario:

 

Product 1 cost $150

Coupon -$150

 

Shipping $34

 

oder_total - 0

order_shipping - 34.00

 

result - problem processing

 

Goal:

 

Product 1 cost $150

Coupon -$150

 

Shipping $34

 

oder_total - 0 + 0.10 = 0.10

order_shipping - 34.00

 

result - processing success!

Share this post


Link to post
Share on other sites
Although an alternative could be to force the shipping_cost to become the total amount passed to PayPal IF $order->sub_total is zero.

I suggested earlier the above, would that not suffice?

Doing the above requires alot less changing than having to accomodate a $0.10 processing fee which should really be burdened by the Merchant and not the customer.


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

Share this post


Link to post
Share on other sites
I suggested earlier the above, would that not suffice?

Doing the above requires alot less changing than having to accomodate a $0.10 processing fee which should really be burdened by the Merchant and not the customer.

 

 

I totally missed that one...

 

how can I do that?

Share this post


Link to post
Share on other sites

sorry about repeating - edit post timed out on me

 

 

I suggested earlier the above, would that not suffice?

 

 

I totally missed that one...

 

how can I do that (forse shipping to be total if total is 0)?

 

Doing the above requires alot less changing than having to accomodate a $0.10 processing fee which should really be burdened by the Merchant and not the customer.

 

i do not quite agree with that, but it is just me - they get discount already. it could be $0.01 for what i care i am not sure that paypal will respect $0.01

 

also this should be less confusing to a customer than seing on paypal that shipping became 0 all of a sudden and they pay for product... i suppose i can put a disclamer or something... also if sipping becomes order total then paypal will charge 3% off it...

Share this post


Link to post
Share on other sites
Guest
Fireman, which sql script did you run, if migrating from 2.4 etc, then you should just run paypal.sql.

 

 

Yes i did, but I also didnt' remove the old paypal stuff that was there from the 2.4 install. Could this have cause the errors? If so, how do I remove them?

 

Thanks as always!

Share this post


Link to post
Share on other sites
sorry about repeating - edit post timed out on me

I totally missed that one...

 

how can I do that (forse shipping to be total if total is 0)?

i do not quite agree with that, but it is just me - they get discount already. it could be $0.01 for what i care i am not sure that paypal will respect $0.01

 

also this should be less confusing to a customer than seing on paypal that shipping became 0 all of a sudden and they pay for product... i suppose i can put a disclamer or something... also if sipping becomes order total then paypal will charge 3% off it...

 

Well thinking further now, and like you say having the actual shipping cost is preferable; however the code is there for you do with as you see fit - I don't think any permanent change will occur in the distro code for this, well at least not untill PayPal themselves start to support discounts.

 

There are three or four places where the amount may need to be adjusted, these occur in paypal.php and paypal/catalog/checkout_process.php, if I can recall entirely that is.

 

Yes i did, but I also didnt' remove the old paypal stuff that was there from the 2.4 install. Could this have cause the errors?  If so, how do I remove them?

 

Thanks as always!

 

Can't answer properply for this one, depends on what you did when migrating to the latest version, your old PayPal table should of been removed and replaced with the new one (or suitable alternations made); plus all of the edits would need to be changed and or confirmed etc.


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

Share this post


Link to post
Share on other sites
Guest

All I did for the sql file was copy & past it into the myphp and it did give me an error saying that there was a duplicate item, but that's it.

 

What would you suggest? Delete the paypal stuff that's in my db & re-run the sql file again?

Share this post


Link to post
Share on other sites
All I did for the sql file was copy & past it into the myphp and it did give me an error saying that there was a duplicate item, but that's it. 

 

What would you suggest?  Delete the paypal stuff that's in my db & re-run the sql file again?

 

In the sql file replace

ALTER TABLE orders ADD payment_id INT( 11 ) DEFAULT '0' NOT NULL;

ALTER TABLE orders_products_attributes ADD products_options_id INT( 11 ) DEFAULT '0' NOT NULL;

ALTER TABLE orders_products_attributes ADD products_options_values_id INT( 11 ) DEFAULT '0' NOT NULL;

 

with

ALTER TABLE orders CHANGE paypal_ipn_id payment_id INT( 11 ) DEFAULT '0' NOT NULL;

 

and then run the sql file.


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

Share this post


Link to post
Share on other sites
Guest

Ok, I just looked at the sql file 3 times & I don't see that at all in there....

 

just to make sure, we are talking about 2.9 right? Maybe the sql file is missing something?

Share this post


Link to post
Share on other sites
Guest

Ok, obviously, the fourth time was the charm - I found those tables... Now when I change them to what you wanted me to change them to, I now get this message in the bd...

 

Error

SQL-query :  

ALTER TABLE orders CHANGE paypal_ipn_id payment_id INT( 11 ) DEFAULT '0' NOT NULL 

MySQL said: 


Duplicate column name 'payment_id'

 

Not sure what I should be changing or whatever to make it work....

Share this post


Link to post
Share on other sites
Ok, obviously, the fourth time was the charm - I found those tables... Now when I change them to what you wanted me to change them to, I now get this message in the bd...

 

Error

SQL-query :  

ALTER TABLE orders CHANGE paypal_ipn_id payment_id INT( 11 ) DEFAULT '0' NOT NULL 

MySQL said: 
Duplicate column name 'payment_id'

 

Not sure what I should be changing or whatever to make it work....

 

Ok so drop the ALTER lines at the top of the script and then run it, e.g you want it to the drop/create table stuff only, you could copy and paste into the phpMyAdmin SQL field etcc..


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

Share this post


Link to post
Share on other sites
Guest

Woohoo!

 

that problem is now fixed! Thanks a lot for the quick replies. I do have another quick question for you. How would I go about deleting the old "Pending Paypal Notification"? I'm assuming that I need to go into the db & delete it there due to the history?

Share this post


Link to post
Share on other sites
Well thinking further now, and like you say having the actual shipping cost is preferable; however the code is there for you do with as you see fit -

 

that is a bit of the problem for me - i can tweak the code but not write it.

 

if you, please can tell me what the change sould be?

 

i do not assume that this is the right code/directions

 

find

 

$order->['total'] - $order->['shipping_cost']),

 

replace with

 

if $order->['total'] = 0 - $order->['total'] + 0.10
$order->['total'] - $order->['shipping_cost']),

 

or is it?

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  

×