Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

PayPal_Shopping_Cart_IPN


devosc

Recommended Posts

  • Replies 1.1k
  • Created
  • Last Reply

Top Posters In This Topic

When you said that you had IPN deactivated, does that mean in your PayPal account profile it says IPN 'off'. Because I noticed I had to have mine 'on' but not specify a url, getting PayPal to allow you to switch it 'on' but without a url seemed buggy, I think I just deleted the pre-prompted 'http://' from the field and it then allowed me to save whilst having it enabled.

 

I always had IPN in my paypal account set to active together with the url to my ipn.php . It was just this morning that i deleted this url leaving the IPN option active.

 

Another unkown factor that could be coming into play is the locale, from the US it seems ok for me but, a] I don't see the the option for a customer to proceed without having to create an account (login) and b] outside the US I'm not sure if all these features and been effectively implemented yet (I don't know).

 

The difference between paypal members inside and outside the U.S. is that from outside the U.S. you can not (yet) pay without having an account with paypal whereas in the U.S. (means for paypal accounts in the U.S.) you can pay just by creditcard without having to open an account with paypal before.

 

However, to invent this for european merchant account holders is a top priority at paypal.

 

Marcus

Link to comment
Share on other sites

I'm having a problem with this contrib. I've installed it and tested it with an order once, then I had two successful orders come through..... but today, a customer ordered some stuff, but under his name shows no order and there is nothing under pay pal IPN.... but I received the notification in email. Does anyone know what stopped this order from being added to my list of orders in oscommerce?

Link to comment
Share on other sites

the GreatZorglub, I had a look, the currency seems to be CAD (or CAN :) ) all the way through to the PayPal page, maybe you fixed this or I'm missing something. But I did notice that the 'amount' field is not being filled (and maybe shipping). Shipping overide needs to be enabled in your profile account, can't remember about shopping carts but would hurt to look through your account profile.

 

Also you have a stray 'osCsid' form variable loose on that page somewhere.

 

Sam, you need to provide more info, what emails did you get etc...

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

Link to comment
Share on other sites

I received only the normal sale notification from Pay Pal with the cart details etc. However when I logged in to admin in oscommerce, the customer was there as a customer, but there were no orders showing under his name.

 

Somehow it totally bypassed the system and only went through Pay Pal.

 

Luckily I have it set so it shows the cart contents otherwise i wouldnt have a CLUE what he purchased.

 

Anyone know what would cause the order not to be logged by oscommerce?

Link to comment
Share on other sites

Greg,

 

one further observation. After i finished testing i had to do all the refunds in paypal. I still run your contrib in testmode and i realized that i received an email from OsC whenever i did a refund saying:

 

Subject:

collido.de PayPal IPN: unkown transaction type

 

Text:

I received an unkown post from 64.4.241.140

Are you running any tests?

 

I guess this is a normal behaviour of the contrib when run in testmode and just want this to be confirmed.

 

Marcus

Link to comment
Share on other sites

Marcus, could you post one the DEBUG emails but comment out anything that identifies your business and the transaction numbers, what I'm looking for is the transaction and payment types.

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

Link to comment
Share on other sites

Sam, have previously received an IPN, did you get a DEBUG email, is IPN enabled in your PayPal account profile, have you set any admin/configurations/sessions settings?

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

Link to comment
Share on other sites

the GreatZorglub, I had a look, the currency seems to be CAD (or CAN :) ) all the way through to the PayPal page, maybe you fixed this or I'm missing something. But I did notice that the 'amount' field is not being filled (and maybe shipping). Shipping overide needs to be enabled in your profile account, can't remember about shopping carts but would hurt to look through your account profile.

 

Also you have a stray 'osCsid' form variable loose on that page somewhere.

 

Sam, you need to provide more info, what emails did you get etc...

Greg,

 

Yes, I did fix the currency selection issue, however that means I cannot select the Method 2.

 

I still need help on the amount not appearing on the page - I know about that, I raised it on my original posting - where do I look to solve that? I did overide the shipping in Paypal account, can you elaborate on what needs to be done with the shopping cart? I have no shopping cart option in my Paypal profile.

 

As to the rogue ocSid tag, where do I look to fix that ?

 

Thanks

Link to comment
Share on other sites

Marcus, could you post one the DEBUG emails but comment out anything that identifies your business and the transaction numbers, what I'm looking for is the transaction and payment types.

Sure. This is an extract from the last test i did.

 

payment_status=Completed
payment_type=instant
txn_type=web_accept


PayPal RECONSTRUCTED POST
#########################

payment_status=Completed
payment_type=instant
txn_type=web_accept

Link to comment
Share on other sites

Marcus, when you said test did you mean 'Refund'.

Anyway, it should of stored the transaction becasue you are in Test Mode, I've discussed this with Cornelius before, but I think there is a PayPal problem because in the Refunds that I did they were not sending the the 'txn_type' so it is not being stored even in Test Mode.

I wouldn't worry too much for now since PayPal have recently changed their Refund process, as long as the 'real' orders are being processed ok, then thats all this contrib has been developed to handle to date.

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

Link to comment
Share on other sites

First, thanks Greg for your contribution.

 

Here's my experience:

 

Auto-Return ON

 

With "stock" paypal.php and ipn.php, once I confirm my payment on Paypal, I am returned to a blank checkout_process.php screen. HOWEVER, otherwise everything seems perfect: the order does show up under Orders, and the IPN shows up under PayPal IPN. I do get one "unknown transaction" email and one "cart" email. Stock is reduced accordingly, though the item remains in the shopping cart if I log back in.

 

When I comment out the "exits" in ipn.php, I do get a "successful checkout" screen (though it seems to take ages to get there from the Paypal redirect screen, and sometimes never gets there at all), and my shopping cart is emptied. However, the Orders screen then shows several orders, the IPN screen shows several IPNs, and stock is reduced based on the multiple orders. I get many emails, Unknown Transactions, Invalid Transaction, Unknown Verification Occurence.

 

Using your "Auto-Return Workaround" seems to have no effect; with the "exit"s intact, I still get the blank screen but order and IPNs go through fine (though I still get two emails, one "unknown" and one "cart"), and with "exit"s commented out, I get multiple orders and IPNs.

 

Auto-Return OFF

 

With untouched phps, everything seems good. Regardless of whether or not I click "continue" on Paypal's site after paying, the order and the IPN both show up in my Admin console, and I get only one "cart" email, no "unknown transaction"s. I get the "successful checkout" screen and my cart is emptied.

 

So no question or request for help here; just thought this slightly different situation might help in figuring out why certain problems exist for future development.

 

Well, okay, one question: now that I am not getting blank checkout screens, it seems to take vastly longer to get from Paypal back to my site. Is this because of the verification that's going on?

 

...it seems I spoke too soon. Everything works perfectly when I pay with a Paypal account. But when I pay with a credit card and don't "Continue" from Paypal's site, I get the "cart" email, but it says "COULD NOT PROCESS: xxxx has sent you $xxxxx". The order and IPN don't show up in Admin. This is when I buy a normal-priced item. Buying the "test" item priced at .01 still goes through instantly and generates the correct orders and IPNs.

Link to comment
Share on other sites

Marcus, I just re-read the update pages from PayPal about refunds there is no longer a txn_type sent when a refund occurs so now it will not do anything at all. Further scripting is required in order to find the transaction that the refund is related to.

 

How To Upgrade To v1.5a From v1.5

Jeff (and others),

Earlier today I uploaded version 1.5a even though the zip is labelled v1.6.

So Jeff I would suggest that you get this version, but since you have already got v1.5 installed, you only need to copy over:

 

catalog/ipn.php

catalog/includes/classes/paypal/ipn.php

catalog/includes/modules/payment/paypal.php

 

This should resolve your blank screen issues.

 

The contrib allows you to use the PayPal Auto-Return feature, specify a page_style (not tested), and a no_shipping option (whether the customer can use their own Shipping Address they have registered with PayPal - see Manual for details, also I haven't seen it work either).

 

The v1.5a contrib is mainly to update the previous version with the minor fixes, revisions, discussed in the forum (up to page 30).

 

In v1.5a there is no catalog/checkout_process.php due to a revision in paypal.php, so if you want you can edit your existing checkout_process.php and find:

'currency_value' => $order->info['currency_value'],
'paypal_ipn_id' => $order->paypal_ipn_id);// PayPal_Shopping_Cart_IPN

and replace with

'currency_value' => $order->info['currency_value']);

 

Hopefully everything is included in the zip file?

 

Jeff

For the Credit Card can you check the DEBUG emails, does what is the payment_type, transaction_type, and status etc

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

Link to comment
Share on other sites

Marcus, I just re-read the update pages from PayPal about refunds there is no longer a txn_type sent when a refund occurs so now it will not do anything at all. Further scripting is required in order to find the transaction that the refund is related to.

Thanks for testing and clearifying this :)

 

P.S.: I am asking again: Where is your Donation button? ;)

Link to comment
Share on other sites

Greg,

 

PayPal_Shopping_Cart_IPN v1.5a rocks!

 

I just did the upgrade and i can now even use the Auto Return Feature (with ''Using PayPal Auto-Return' set to 1).

 

I didn't test the 'PayPal Page Style Name' and 'Enable PayPal Shipping Address' yet.

 

Thank you so much for your wonderful contribution.

 

Best regards,

Marcus

Link to comment
Share on other sites

My first test with 1.5a looks promising, thank you, Greg.

 

With Auto-Return on, making the .01 test purchase, everything is fine as long as I allow Paypal to redirect me to my site. Order shows up, IPN shows up, successfully checked out and cart emptied.

 

But if I hit "esc" or went to another page before Paypal could finish redirecting me back to my store -- which I imagine many people might do, as my store seems to load less-than-instantly -- there are some problems. I get around 6 or 7 debug emails of various types. The IPN shows up in OSC correctly, and the order shows up as well, BUT the order is for .00 and has no items on it; basically an empty order. The IPN shows the correct amount, .01.

 

In this case, the customer's order shows no shipping or billing address, no payment method, no products, and an order amount of $.00, despite having an accurate IPN associated with it under the IPN list.

 

I'll do more testing later with Auto-Return off and with credit card and non-test amounts.

Link to comment
Share on other sites

Hmm, just did it again, hit "esc" the instant the Paypal redirection screen came up, and this time the order went through fine; one order, one IPN, one IPN "cart" email. Curious.

 

This is why I never put much stock in the whole "the definition of insanity is doing the same thing and expecting different results" thing.

Link to comment
Share on other sites

I did some more testing on my site today with 1.5a. It turns out that IPN won't work for me unless I use the fopen modification to includes/classes/paypal/ipn.php (i get a bunch of unknown transaction emails). and it works ONLY if test mode is set to ON. if test mode is OFF then i don't get any emails at all. BUT, although this method works, I do get 2 'Order Process' emails for every actual order. 1 with the correct price, and 1 with $0.00 and no customer info. this is OK since with 1.5, IPN didn't work for me unless the user clicked 'continue' on the Paypal screen.

Link to comment
Share on other sites

oops i made a mistake. turns out if using test mode, i get only 1 'order process' email, but a bunch of other 'unknown' emails with it.

 

i am only seeing the $0.00 'order process' if i use the default ipn.php with test mode. without test mode i don't get any emails.

 

hope this info can be of use to someone..

Link to comment
Share on other sites

Marcus, I've configured the 'www' link to accomodate this, although I'm not totally sure of the in's and out's of it all but it should at least get you to the right place :D. Many Thanks.

 

Jeff, I'll have ago later, hows the CC method going?

 

arm1tage, bit confused here, I am assume you copied over everthing ok, post the DEBUG email but comment out anything relating to your business ID and the transaction ID.

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

Link to comment
Share on other sites

Okay, credit card purchase of $13.51 worked beautifully.

 

One thing to note is that this was a CC purchase only, i.e., one made without going through or creating a Paypal account (using Paypal's option that allows you to accept CC payments from non-Paypal accounts). Using this method, Paypal does not give an auto-return at all; you must click continue to return to the store (which I didn't).

 

So everything seems to be working fine so far. I have no explanation for why my first test produced such odd results. The only thing different about that first attempt was that when I was sent to Paypal to make payment, on each screen I had the "display non-secure items?" pop-up. I did not get those before or since.

 

Now that everything seems working, I'll try one of every possible kind of order -- paypal, cc, allowing redirection to the site and skipping redirection -- just to make sure everything is golden, but as of now it seems to be. Thank you, Greg.

 

One quick question -- which file has the text that says "PayPal" accompanying the radio button on the checkout_payment page? I want to add a note directing customers to select this if they are paying by credit card or Paypal account.

Link to comment
Share on other sites

Jeff, that's cool, if they did click the continue button (CC wise) and provided the Customer-osC IPN info is included (view the source of that page) then when they return they should be automatically redirected to checkout_success.php with 'paypal=authorized' in the url.

 

To change the PayPal text occuring in the Payment section look in the languages/.........../modules/payment/paypal.php file for the TITLE and TEXT_DESCRIPTION, it is one of those 2.

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

Link to comment
Share on other sites

Tammy, you can update the code in paypal.php in the modules payment section; however the types of products/services of your site is prohibited for use with PayPal

 

 

Its not for our main site, its for our -work-in-progress- www.discountcelebrityphoto.com

 

Theres absolutely nothing for this new domain that would be prohibited by paypal.

Link to comment
Share on other sites

Argh. Had a friend test using a Paypal account and a non-test purchase; again, I got the correct IPN, but the associated order had no name, address, items, or dollar amount.

 

I think for now I'm going to go back to untouched 1.5 and use auto-return; the inelegance of having customers returned to a blank screen is much less important to me than making sure the stock is adjusted correctly by their order.

Link to comment
Share on other sites

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