Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

PayPal_Shopping_Cart_IPN


devosc

Recommended Posts

Greg,

 

A little more information. The failed address verification at this point is intentional. The debug I included was from the original payment submission. I receive a similar debug (web_accept) after I go into PayPal and accept the payment. But never see any updates inside osCommerce. In fact, if I look at the contents of the paypal_ipn and paypal_orders tables from within phpMyAdmin I never see any entries (not from the original order nor from the subsequent web accept).

 

S,

@

 

Allen your one is a bit simplier because the payment_status is still 'Pending' the customer needs to verify their address since the pending_reason is 'address', didn't this show in the admin or does it still say 'Pending Payment' ? on the customers/catalog side it will still say 'Pending Payment' you need to go into your paypal account and accept the payment, you could also to configure so as to always accept payments regardless of the address verification.
Link to comment
Share on other sites

  • Replies 1.1k
  • Created
  • Last Reply

Top Posters In This Topic

Allen, is your paypal_ipn table completely empty? did you get an email listing the email config settings? when the ipn is inserted you should get an email for that too, if it is a duplicate then you also get another email as well.

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

Link to comment
Share on other sites

Greg,

 

Yes, my paypal_ipn table remains empty. I've cleaned out all orders from the system then initiated a single order paying by paypal. I see the order but no entries in the paypal_ipn table. Debugging is set at 2. Here is a list of the emails I receive:

 

1) Debug (contents previously submitted)

2) Verified

Subject:  Rocker Land Store PayPal IPN: Verified

=============================================

Connection Type

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

curl= 1, socket= , domain= www.paypal.com, port=

 

PayPal Response

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

VERIFIED

3) Email Config

Subject:  Rocker Land Store PayPal IPN: Email and Business ID config

=============================================

Rocker Land Store

Primary PayPal Email Address: [email protected]

Business ID: [email protected]

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

Primary PayPal Email Address: [email protected]

Business ID: [email protected]

4) Web Accept

Subject:  Rocker Land Store PayPal IPN: Cart - Web Accept

=============================================

You have received a payment of 0.01 USD

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

This payment was sent by customer Allen Cartright via the osCommerce / PayPal Shopping Cart

 

Then I go into PayPal and accept the payment. From here the series of emails repeat. The only difference is in the debug email where the payment status is trying to be updated to complete.

 

I've obviously missed something late last night. Sorry to be a pain. I'm going back thru the install steps to try to validate I haven't missed a step.

 

S,

@

Link to comment
Share on other sites

fasteddie, check your orders database table is there an order in there with no number in the order_id field?

Yes, Greg, indeed there was. I deleted that test order. It looks like it's working now! At least the user gets sent to the Paypal payment page and they get returned to my site after payment. However, the order is NOT showing up on my Orders Page. In my orders database, there is no orders_id for that order.

 

I do recall doing a mod that changes the order number so it's not just 1,2,3,4,5 and it's some kind of order number based on date too. An example of one of my order numbers is 1100403452 which would be 1 then date 10/04/03 then randomly generated 3 numbers, 452...

 

Hope I can fix this!!! Hmm, just tried a test order with paying via money order and that order goes went through fine, and it generated an orders_id as well.

Edited by fasteddie
Link to comment
Share on other sites

fasteddie,

 

yeah there seems to be something going on with your order numbe, by installing this contrib you will not be using that feature unless you update the code in catalog/includes/modules/payment/paypal/cheocut_process.php too. Normally the $insert_id is the auto increment value from the db table, but this may not be occurring if the orders table order is no longer being auto-incremented...

 

you need to assign the $insert_id the value of the order number created assuming that it is the primary key.

 

the order number is passed into a the custom field in catalog/includes/modules/payment/paypal.php in

 

tep_draw_hidden_field('custom', $insert_id ) .

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

Link to comment
Share on other sites

Perhaps the problem is I didn't enable Paypal IPN on the Paypal website? In your instructions, it says not to put a URL, however, when I try to tick the IPN box but not have a URL on Paypal's site, it says:

 

You must enter a properly formatted URL into the notification URL field in order to activate Instant Paypal Notification.

Link to comment
Share on other sites

Allen did you copy over the new catalog/ipn.php file? that las email should no longer be sent because it was removed in the new version. The very first bit of php code in the new version of this file is now:

 

require_once('includes/modules/payment/paypal/application_top.php');

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

Link to comment
Share on other sites

fasteddie, yeah it is weird, what I had to do was delete the http:// from the textfield and then hit save (with the checkbox ticked).

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

Link to comment
Share on other sites

fasteddie, yeah it is weird, what I had to do was delete the http:// from the textfield and then hit save (with the checkbox ticked).

Okay, that Paypal IPN part worked. Now to figure out my order number problems! :)

Link to comment
Share on other sites

Greg,

 

THANK YOU VERY MUCH! Somehow I didn't upload the catalog\ipn.php to my server. Must have been more of that wonderful late night mind mush. Back to testing, improving images (thumb nails), and so much more.

 

Once again, thank you.

 

Allen

Link to comment
Share on other sites

I'm using the 16 Apr 2003 - Random Order Number contribution here:

 

http://www.oscommerce.com/community/contri...l/search,random

 

Okay, I've edited the paypal/checkout_process.php like the contrib states, however, I'm not sure where to put these lines:

 

-- Paste Randomizing Script right before this line in checkout_process.php

 

// load the before_process function from the payment modules

 

///////////////// RAMDOMIZING SCRIPRT BY PATRIC VEVERKA \\\\\\\\\\\\\\\\\\

 

$t1 = date("mdy");

srand ((float) microtime() * 10000000);

$input = array ("A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z");

$rand_keys = array_rand ($input, 2);

$l1 = $input[$rand_keys[0]];

$l2 = $input[$rand_keys[1]];

$r1 = rand(0,9);

 

$ordernum = '1'.$t1.$r2.$r3.$r1;

 

///////////////// End of Randomizing Script \\\\\\\\\\\\\\\\\\\

Link to comment
Share on other sites

fasteddie,

put it after:

  $order_totals = $order_total_modules->process();

after then do steps 3 and 4 as usual.

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

Link to comment
Share on other sites

Hi Greg!

 

I'm having a problem with version 0.971 (first time using a contrib...first OSC setup).

 

I followed the directions for the hommade part as I have made quite a few changes from the stock OSC (not major structure changes or anything..just lots of text definition changes, image changes etc) and now I'm getting this error...

 

Fatal error: Cannot redeclare class paypalipn in /homepages/21/d93868703/htdocs/Tools/catalog/includes/modules/payment/paypalipn.php on line 15

 

I fixed a couple other problems I was having with it (such as it showing the definition names rather than the values...) but I'm not sure how to fix this...:(

 

any help would be appreciated...

Contribs added:

AdminLogin-Catalog With Images-Credit Class/Gift Voucher-CoolMenu

EasyPopulate-LoginBox-Paypal Shopping Cart IPN-PDF Catalogs

Product Listing In Columns - Image Strip

--

...the young jedi said to his master "you want me to do WHAT?"

Link to comment
Share on other sites

Hmmm, another test run seemed to work fine as far as the user's side is concerned. However, after Paypal payment, my database still shows the order as Pending Payment. The Paypal page did return the user back to my site to the checkout_success.php page.

 

I have nothing in my Paypal IPN Notifcations on my admin side and when I click on the order details all the Paypal info is blank:

 

PayPal Customer Registration Details

First Name:

Last Name:

Business Name

Address Name

Address Street

Address City

Address State

Address Zip

Address Country

E-Mail Address:

Ebay ID

Payer ID

Payer Status

Address Status

 

 

PayPal IPN Transaction Details #

Payment Type

Payment Status

Pending Reason

Invoice

Payment Date

Last modified

Currency

Gross Amount

Payment Fee

Exchange Rate

No Of Cart Items

Link to comment
Share on other sites

Greg, thank you very much for this excellent contribution! :)

 

In the FAQ you wrote:

What url should I specify for the IPN feature to be used

 

You don't, just make sure that it is enabled (i.e. ticked/on), specifying a url will mean any PayPal transaction will result in an IPN being sent to your store even if it is unrelated, thus better not to specify one, it is taken care of by this contribution already.

 

But when I try to leave the URL empty (ie. http://) it doesn't let me leave the screen, and ask me to enter a URL. Which URL do I need to use then?

 

Thanks in advance & Keep up the good work mate!

Link to comment
Share on other sites

ok..I got the class problem fixed (re-uploaded all the paypalipn php files and it start working)...

 

now when I send a test, I get a new error...

 

 

Error: no $paypal_response received.

 

any ideas?

Contribs added:

AdminLogin-Catalog With Images-Credit Class/Gift Voucher-CoolMenu

EasyPopulate-LoginBox-Paypal Shopping Cart IPN-PDF Catalogs

Product Listing In Columns - Image Strip

--

...the young jedi said to his master "you want me to do WHAT?"

Link to comment
Share on other sites

forgot to say...but I do have the ipn enabled in my paypal account and have the URL pointing to the php_notify.php file

Contribs added:

AdminLogin-Catalog With Images-Credit Class/Gift Voucher-CoolMenu

EasyPopulate-LoginBox-Paypal Shopping Cart IPN-PDF Catalogs

Product Listing In Columns - Image Strip

--

...the young jedi said to his master "you want me to do WHAT?"

Link to comment
Share on other sites

Greg, thank you very much for this excellent contribution! :)

 

In the FAQ you wrote:

What url should I specify for the IPN feature to be used

 

You don't, just make sure that it is enabled (i.e. ticked/on), specifying a url will mean any PayPal transaction will result in an IPN being sent to your store even if it is unrelated, thus better not to specify one, it is taken care of by this contribution already.

 

But when I try to leave the URL empty (ie. http://) it doesn't let me leave the screen, and ask me to enter a URL. Which URL do I need to use then?

 

Thanks in advance & Keep up the good work mate!

You have to select the http:// line and empty it, then hit Save. :)

Link to comment
Share on other sites

Cheers, fasteddie, yeah sorry Mikey I'll make a better note in the next version...

 

Mark, your not using this contribution so I'm not sure.

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

Link to comment
Share on other sites

Just wanted to thank greg, mine seems to working great after checking it out for a couple days. I love the extra info I get with paypal ipn to verify the address and whatnot!

 

No more recover cart look ups to know what someone bought

Link to comment
Share on other sites

I second that! Great Job Greg!

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...