Jump to content
Sign in to follow this  
devosc

[Contribution]Paypal IPN - Devosc

Recommended Posts

OK - I have made some hacks to the payment/paypa.php file and it seems to work for me now with CCGV.

 

(If anyone needs it let me know)

 

I also made some changes to the information passed to paypal so it does not say the Company Name but these are not essential to the fix.

 

But one thing that I still need to figure out is the update to teh GV. Using PP IPN leave the gift voucher in the persons account. I have not checked the CC to see if updates the use of it.

 

I am pretty tired so if anyone has the answers to that - great.

 

Chris


osC Contributions I have published.

 

Note: Some I only provided minor changes, updates or additions!

Share this post


Link to post
Share on other sites

Regarding the 'Pending Payment' status:

 

When someone decides to use Paypal to pay (via IPN), and they don't complete:

 

1) No stock is removed from the DB

2) They can't return and pay for the goods later

 

 

 

Has there been a fix issued for these two yet? (or maybe it's just for point (2))

 

 

 

Thanks

Share this post


Link to post
Share on other sites

Hi was hoping to use this contrib. but seem to have come unstuck. I have followed all the instructions and I get as far as Step 4 (New Order Status)

In admin->localization->Orders Status, create a new field called 'Pending PayPal Notification'

 

however when I try to open my 'admin' I now get the following error - I am running CCGV as well and have made the suggested changes to get it running with paypal in this thread but still get this message -

 

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

 

select paypal_ipn_id from orders where orders_id = '0'

 

[TEP STOP]

 

 

I am now at a standstill and can't access my shop admin at all - would appreciate any help.

 

thanks

Maria

Share this post


Link to post
Share on other sites

Did you make teh changes to the the database?

 

ALTER TABLE orders ADD paypal_ipn_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;

 

This has to be done and that error looks liek you didnt add the first one.

Edited by clarocque

osC Contributions I have published.

 

Note: Some I only provided minor changes, updates or additions!

Share this post


Link to post
Share on other sites

Hi and thanks for your quick reply - I did this first as per the install instructions - in php my admin I went into add new field and added paypal_ipn_id INT( 11 ) DEFAULT '0' NOT NULL; - this is the only way I know how to add the field - am I doing it right??

 

it now sits at the bottom of the orders table under giftwrap -

 

 

giftwrap  varchar(20)  No  AFTER cc_expires               

paypal_ipn_id  int(11)  No  0               

Check All  /  Uncheck All    With selected:     

 

I think the error looks like it dosn't know what to do with it - not that it isn't there??? I don't know - just my guess!?

Share this post


Link to post
Share on other sites

Well I am no progammer but I believe this means it is not there.

 

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

select paypal_ipn_id from orders where orders_id = '0'

[TEP STOP]

 

Have you verified it is in the table?

 

YOU can run the code I posted above in sql in phpmyadmin


osC Contributions I have published.

 

Note: Some I only provided minor changes, updates or additions!

Share this post


Link to post
Share on other sites

Hi and thanks,

 

when I ran the sql code - in php my admin - I got the same error message -

 

How can I verify it is there - besides looking at it? I can see it in the orders table - it looks o.k. ?

 

I am definately no programmer either but all other additions have worked o.k. for me?

 

cheers.

 

Maria

Share this post


Link to post
Share on other sites

Not sure what went astray - but my problem seemed to resolve itself - once I deleted and re-added a couple of time and re-installed the paypal contrib. from scratch.

 

thanks for you help. :D

 

regards,

 

Maria

Share this post


Link to post
Share on other sites

I just installed the ipn contribution. I get this when i go to the admin module payments for paypal...I get a lot of empty box's along with the regular ones. Any Clues?


life is short "Eat Desert First"

Share this post


Link to post
Share on other sites
Just wondering if this is correct for catalog/checkout_success.php

 

This is for Purchase Without Account 0.71 & PayPal 2.3 - Hopefully someone can verify

 

From The original with paypal

 

Find:

 

tep_redirect(tep_href_link(FILENAME_DEFAULT, $notify_string));

}

 

replace it with:

-- Cut.

 

Final ?:

 

 

Thanks

Sorry for the spam: if you find the answer to this, I'd be v. interested also...

 

 

 

Thanks

Share this post


Link to post
Share on other sites

I believe i'm somewhat close, but for some reason my tax isnt showing on the paypal website, i even added the tax feature on paypal profile as well.

Share this post


Link to post
Share on other sites

Even after changing checkout_process.php

 

to this:

 

if(!class_exists('order_total')) {

include(DIR_WS_CLASSES . 'order_total.php');

$order_total_modules = new order_total;

$order_totals = $order_total_modules->process();

}

 

and adding the $order_total_modules to the global statement my tax isn't being displayed on the paypal website, and i even have the paypal sales tax enabled.

 

Anyone know a solution?

Share this post


Link to post
Share on other sites

OK for those who are using CCGV with IPN 2.3. You may have noticed that the customers GV balance does not go down when they buy using PP.

 

Here is the fix I used:

in /includes/modules/payment/paypal/checkout_process.php

 

some where near line 78

 

find

 

//Now check to see whether order session info exists AND that this order does not currently
? ? //have an IPN.
? ? if ($orders_check['orders_id'] > 0 && ?$orders_check['paypal_ipn_id'] == '0' ) {
? ? ? $order_exists = true;
? ? }
? }

and under that add:

 

$order_total_modules->apply_credit();//ICW ADDED FOR CREDIT CLASS SYSTEM - added for CCGV
// it is placed in here instead of /paypal/checkout_update.php to prevent mutliple order from one GV. ?If in update it will not apply until IPN is returned thus allowing multiple orders using same GV if IPN is not returned

 

ok I am no programmer but it worked for me. SO I seem to have IPN 2.3 up to speed excecpt one little thing.

 

When using Affiliates - PayPal sales do not seem to calculate. I believe it is beacuse the code :

// Include OSC-AFFILIATE 
?require(DIR_WS_INCLUDES . 'affiliate_checkout_process.php');

is found in /catalog/checkout_process.php and is not in the IPN and checkout_process.php is skipped.

 

So I tried placing that code in a few different files with no luck. I am not sure if that is the answer or not - so any suggestions would be great.

 

Chris

 

NOTE: I am not a programmer and the above fix worked for me: use at your own risk and BACK UP!

Edited by clarocque

osC Contributions I have published.

 

Note: Some I only provided minor changes, updates or additions!

Share this post


Link to post
Share on other sites

Hello all,

I am a little lost as to how to test this contribution. I once saw something on it but cant find it in the posts anymore.

 

Please could someone enlighten me on how to test?

 

Will a how to test section be integrated into the docs?

 

Is there a "dummy" creditcard number to use when testing the IPN?

 

Thanks in advance for the help.

Share this post


Link to post
Share on other sites
Do you have CCGV installed?

 

And turn off Tax in PP

Actually I don't have CCGV installed, but have tax on, on the paypal website.

Share this post


Link to post
Share on other sites
Hello all,

I am a little lost as to how to test this contribution.  I once saw something on it but cant find it in the posts anymore. 

 

Please could someone enlighten me on how to test?

 

Will a how to test section be integrated into the docs?

 

Is there a "dummy" creditcard number to use when testing the IPN?

 

Thanks in advance for the help.

Sorry for this post... I finaly figgured out how to test the paypal ipn. Was not aware that the test page was launched from the module setup area.

Share this post


Link to post
Share on other sites

Wierd, I just installed paypal ipn 2.3 on a fresh osC 2.2 with no other contributions or modifications and did a test and tax is still not passing over to paypal. I currently don't have tax installed on the paypal website. I also haven't added any modifications from these 10 forum pages. Anyone know what could be the problem? Am i suppose to use any modifications from the previous 10 pages.

 

Thanks for the help in advance.

Share this post


Link to post
Share on other sites

I also tried changing catalog/checkout_process.php to

 

require(DIR_WS_CLASSES . 'order.php');

$order = new order;

 

require(DIR_WS_CLASSES . 'order_total.php');

$order_total_modules = new order_total;

 

$order_totals = $order_total_modules->process();

 

// load the before_process function from the payment modules

$payment_modules->before_process();

 

and catalog/includes/modules/payment/paypal/checkout_process.php

 

global $payment_modules, $shipping_modules, $order, $currencies, $cart, $customer_id,

$sendto, $billto, $shipping, $payment, $language, $currency, $languages_id, $order_total_modules, $order_totals;

 

and :

 

if(!class_exists('order_total')) {

include(DIR_WS_CLASSES . 'order_total.php');

$order_total_modules = new order_total;

$order_totals = $order_total_modules->process();

}

 

eventhough i don't have ccgv.

 

Thanks again!

Share this post


Link to post
Share on other sites

Woo!!!! Got it to work using the above and changing the Shopping Cart Method back to Aggregate instead of itemized, although i wish i could use itemized. But thank god i believe i'm 99% done with my store.

Share this post


Link to post
Share on other sites

I have the PayPal_Shopping_Cart_IPN_v2.2 contribution setup. I have received an eCheck payment and the status was returnd as pending. Now when I go into PayPal and view my account, the transcation has cleared. When I look at the order in OSC Admin and when I view the PayPal IPN details screen, the transaction is still in pending status. I though that this would automatically change when the eCheck cleared. Is there anything that I did not config correctly or is this delay normal? The eCheck cleared today.


"There is no doubt about precisely when folks began racing each other in automobiles. It was the day they built the second automobile." - Richard Petty

Share this post


Link to post
Share on other sites

Talon, congrats....

 

Scott, can't tell without looking, however a distinguishment needs to made between the osCommerce 'Pending' order status, and the PayPal 'Pending' payment status.

What should happen is something like:

 

Customer confirms osCommerce order (checkout_confirmation.php)

osC order status = 'Pending PayPal Notification'

No IPN History

 

[ii] Customer makes an eCheck payment (PayPal site)

osC order status = 'Pending'

ipn.payment_status = 'Pending'

 

[iii] eCheck clears and another IPN is sent (hopefully) with a 'Completed' payment status:

osC order status = 'Pending'

ipn.payment_status = completed.

 

These can more appropiately be distinguished from the actual admin->orders page for that order, rather than the summary list of orders.

 

You should be able to mimick an eCheck via the IPN Test Panel, first choose eCheck & Pending and then send another IPN Test this time eCheck and Completed both using the same unique transaction id.

 

Otherwise you would need to look at your debug emails to possibly see what actually happened.


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

Share this post


Link to post
Share on other sites
When someone decides to use Paypal to pay (via IPN), and they don't complete:

1) No stock is removed from the DB

2) They can't return and pay for the goods later

 

I'm looking for this too. I had a customer today try a couple times to make an order. He told me that he forgot his password, and when he went through the whole deal to get his lost password, there wasn't a way to complete the transaction.

 

I'm not too familiar with the code, but it seems like it wouldn't be too difficult if it's "pending paypal notification" to put a link on the Order information page to complete the payment at paypal.

 

It seems that modules/payment/paypal/checkout_process.php already has "if($order_exists)" all over it, but I just don't know how to call 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  

×