Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

PayPal IPN v0.97 released


Guest

Recommended Posts

You can download it from http://www.oscommerce.com/community/contributions,309.

 

Whats new:

v0.97 (Released 05/02/2003)

------------------------------------------------------

- Fix on checkout_success.php for a bug that was causing an "Payment Denied" screen to some users

- The module now works with the $_POST superglobal variables instead of the $HTTP_POST_VARS array (deprecated since PHP 4.1.0) NOTE: there is no problem if you use PHP older than 4.1.0)

- Added new PayPal IPN vars to the database. If you are performing a new install of the module, use paypalipn.sql. If you are making an upgrade of the PayPal IPN Module, use paypalipn_upgrade.sql.

- Fix on the install function, that avoid a problem with the description field on the CONFIGURATION table of oscommerce, that has an 255 Varchar length, so now you can have many orders_status.

- The paypal_temp_data table is no longer needed. Email data is created on the fly now from the paypal_notify.php script. To make it work, 2 new modifications need to be done in /catalog/includes/classes/order.php.

- cURL use is set to OFF by default because many users experienced problems with it.

- Added "Send Test IPN" to the admin, so now its possible to send "fake" IPN's to see if everything works ok. (you should set "test mode" to on)

 

Please test it and send feedback

 

Best regards

Link to comment
Share on other sites

  • Replies 183
  • Created
  • Last Reply

Top Posters In This Topic

great contrib -got this working another site and then I tried to install on a new site - Jan 2003 snapshot - I can't access the paypal ipn in the admin/modules/payment area - I couldn't find any configuration entries in the install info, so I added them myself, but now i don't understand what I missed - why can't I turn on/off from the admin area? What did I miss?

 

:oops:

Link to comment
Share on other sites

I can't access the paypal ipn in the admin/modules/payment area - I couldn't find any configuration entries in the install info, so I added them myself, but now i don't understand what I missed - why can't I turn on/off from the admin area? What did I miss?

 

If you copied the /catalog/includes/modules/payment/paypalipn.php file, then you should be able to turn it on and off from the admin....

 

Is there any way I can see your admin?

 

Best regards

Link to comment
Share on other sites

Hi Buggy

 

BTW, will you be making it compatable with the old checkout too?

 

Right now it is only made to work with the new checkout api...

I dont have the time those days to make the old checkout version too. I know that there are LOTS of people using snapshots with old checkout api, but my intention is to release the v1.0 of the module to work with Milestone 1 of osCommerce... so the only version in which I am working right now is that.

 

I am sorry for all those that are using old snapshots... but I cant do it right now :(

 

Best regards

Link to comment
Share on other sites

I dont have the time those days to make the old checkout version too

 

Understood!

 

I suppose I really need to learn how to update my old database to the latest version...but that's not your problem.

 

Thanks for the contribution.

 

Buggy

Link to comment
Share on other sites

I added all the files which is why I am completely confused ... I'll pm you with the info to take a peak - appreciate your help

 

Hi Rubygirl

 

There is something you are doing wrong

Through your File Manager I can see that you dont have /paypal_notify.php nor /checkout_paypalipn.php nor /includes/modules/payment/paypalipn.php

 

I dont know where did you copy those files... but its clear that they are not there :?

 

Please, download the new v0.97 and try to copy ALL files in the right location.

 

Contact me if you need help

Link to comment
Share on other sites

Okay, so I was really confused with your reply because the files are there!! So I started snooping and realized that although my urls are correct in the admin, the absolute paths were set to site12,which this site is not - so after HOURS of redoing and redoing - bingo - it works!!!

 

Wow was that killing me! :oops: :lol: :oops:

 

Thanks for the assistance - I knew I had installed the contrib right

Link to comment
Share on other sites

Hi Pablo,

 

I am getting the following error when trying to "Send Test IPN"

 

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



insert into paypalipn_txn (txn_id, ipn_result, receiver_email, item_name, item_number, quantity, invoice, custom, option_name1, option_selection1, option_name2, option_selection2, num_cart_items, payment_status, pending_reason, payment_date, payment_gross, settle_amount, settle_currency, exchange_rate, payment_fee, mc_gross, mc_fee, mc_currency, tax, txn_type, memo, first_name, last_name, address_street, address_city, address_state, address_zip, address_country, address_status, payer_email, payer_id, payer_status, payment_type, notify_version, verify_sign) values ('1044431400', 'VERIFIED', '[email protected]', 'item name', '', '1', '', '', '', '', '', '', '0', 'Completed', '', '09:50:00 Feb 5, 2003 PST', '25', '', '', '', '1.02', '25', '1.02', '', '', 'web_accept', '', 'first_name', 'last_name', 'street', 'city', 'state', 'zip', 'United-States', 'confirmed', '[email protected]', 'XPN8XCWPYAMW5', 'verified', 'instant', '1.4', 'DfDT6KaaWATTjfyzTIv4pohGWAs0XDitN19Y')

 

Wondering if you could tell me what the problem could be.

 

Thanks,

David

Link to comment
Share on other sites

I am getting the following error when trying to "Send Test IPN"

Wondering if you could tell me what the problem could be.

 

Hi David

 

It was a problem in previous versions of the contrib, that had an extra space in that field.

 

Try running this sql:

 

ALTER TABLE `paypalipn_txn` CHANGE `exchange_rate ` `exchange_rate` VARCHAR(32) NOT NULL

in your MySQL and it should fix your problem.

 

Tell me if it helps, best regards

Link to comment
Share on other sites

Hi Pablo,

 

Thanks for your quick reply and help. The new sql corrected the problem. However, I am encountering another problem and see if you can help me with this. The problem I am having is

 

1064 - You have an error in your SQL syntax near '' at line 1



delete from customers_basket where customers_id=

 

It occurs when I am trying to "Send Test IPN" and in catalogpaypal_notify.php

 

Thanks,

David

Link to comment
Share on other sites

Hi David

 

It seems like your system is not getting the customers_id.

 

Did you modify your /catalog/includes/classes/order.php file?

 

There are THREE modifications needed in that file.

 

Please make sure you modify it as it says in the orders.txt file included in the contrib.

 

Making those modifications, it should work ok!

 

Best regards

Link to comment
Share on other sites

Hi Pablo,

 

I have doubled checked my files and is still encountering the following error:

 

1064 - You have an error in your SQL syntax near '' at line 1

 

update orders set orders_status = '1' where orders_id=

 

[TEP STOP]

 

Was wondering if you might know what it could be.

 

Thanks,

David

Link to comment
Share on other sites

Excellent..i'll be testing this this weekend.

 

My only problem so far with .96 is that i never get email notification that a new order has arrived. Orders show up in the database, transactions are successfull, but for some reason, my shop wont email me when a new paypal IPN order arrives..?

Link to comment
Share on other sites

Hi David

 

Can it be that you are sending an IPN for a NON EXISTEN order?

 

In Admin->PayPal_IPN->Send_Test_IPN, item_number should be an order_id.

 

Anyway, I will make some modifications to avoid those problem just in case somebody wants to test IPN without an order.

 

I think v0.971 will be released soon to fix that!

 

I will tell you as soon as it is released

 

Best regards

Link to comment
Share on other sites

My only problem so far with .96 is that i never get email notification that a new order has arrived. Orders show up in the database, transactions are successfull, but for some reason, my shop wont email me when a new paypal IPN order arrives..?

 

Hi Jason

 

Ok, give v0.97 a try and you should be able to receive those emails

 

To be sure that the system will work ok, make an order in your shop, using PayPal IPN as the payment module.

Once you are redirected to the PayPal Payment Page, just get away from there and go to your Admin.

Set Test_Mode to ON (in Admin->Modules->Payment->PayPal_IPN and then go to Admin->PayPal_IPN->Send_Test_IPN

 

In "Item_Number" you should insert the order_id of the test order you just made in your shop.

 

Then make the payment, and if EVERYTHING is ok you should receive your email

 

Best regards

Link to comment
Share on other sites

Just curious...why isn't this contribution in the core oscommerce code? It seems without it that paypal is useless. I installed the latest dev snapshot of oscommerce and realized that users go to checkout, go to paypal, then I get a notice from paypal confirming payment but their order never shows up. Why bother having paypal in oscommerce right now without this contribution as it is worthless?

 

Am I missing something or doing something wrong?

Link to comment
Share on other sites

Hi Marc

 

The PayPal payment module included in the core oscommerce code is also ok. It works fine.

The only problem with it, is when the customer DONT hit the CONTINUE button after his payment.

 

The PayPal IPN Payment Module just make use of the IPN (Instant Payment Notification) feature of PayPal, that allows your server to receive a notification each time a payment is made, so osCommerce can identify for which order the payment was.

 

As it require some modifications to the code, plus a NEW (paypalipn_txn) table in the database, it should be used only as a CONTRIBUTION...

Those that do not want to use PayPal should not have that "extra" table in their databases...

 

I think those are the reasons why it is not in the core module.

 

Best regards

Link to comment
Share on other sites

Well, i've installed the module, tested, and it works great!

 

Except...for the same problem:

 

I never receive an email notification (from my website send extra order email to feature) that an order was placed...

 

Other than that, it works quite well. I'm using a Nov 15th, 2002 snapshot.

Link to comment
Share on other sites

Hi Pablo,

 

Great contribution, have set it up and tested it using the Send Test IPN and things look good orders are updated email are sent etc etc. But one question it comes back to the correct notify URL paypal_notify.php page but is this meant to be blank?

 

I know in an actual payment the customer would be redirected to another page on the website ie the checkout_success.php page.

 

By the way I downloaded the contribution today and in the admin>paypalipn_tests.php file I noticed on line 191 the code was as follows;

 

<tr> 

<td class="main">mc_currency:</td>

<td class="main"> 

<input type="radio" name="USD" value="mc_currency" class="form_objects" checked>

<font class="form_std"> USD</font> 

<input type="radio" name="EUR" value="mc_currency" class="form_objects">

EUR 

<input type="radio" name="GBP" value="mc_currency" class="form_objects">

<font class="form_std"> </font>GBP

<input type="radio" name="CAD" value="mc_currency" class="form_objects">

<font class="form_std"> </font>CAD 

<input type="radio" name="JPY" value="mc_currency" class="form_objects">

JPY</td>

</tr>

 

But im sure it should read;

 

<tr> 

<td class="main">mc_currency:</td>

<td class="main"> 

<input type="radio" name="mc_currency" value="USD" class="form_objects" checked>

<font class="form_std">USD</font> 

<input type="radio" name="mc_currency" value="EUR" class="form_objects">

<font class="form_std">EUR</font> 

<input type="radio" name="mc_currency" value="GBP" class="form_objects">

<font class="form_std">GBP</font>

<input type="radio" name="mc_currency" value="CAD" class="form_objects">

<font class="form_std">CAD</font> 

<input type="radio" name="mc_currency" value="JPY" class="form_objects">

<font class="form_std">JPY</font> </td>

</tr>

 

Thanks for a brilliant contribution anyway, in advance!!!! :D

Reddy to Rumble

 

Thank you osCommerce and all who Contribute to her!

Link to comment
Share on other sites

PayPal IPN is working fine, and we thank Pablo for the contribution.

 

However, we still have some customers who do not complete their PayPal transaction and leave us with a pending order (no IPN). We would like to send them an email urging them to go back and complete the payment, but are unsure just how they should be instructed to do that. What should we ask them to do, and is there a link we could provide that would help?

 

Suggestions from your experience, anyone?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...