Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Paypal bug


jab1972

Recommended Posts

I was going to use the basic paypal module, but the thing that bugs me is when the customer gets to the paypal website they get this:

 

Pay To: company name

Payment For: company name

 

Surely the Payment for: should show what they have purchased instead of company name again. Am I doing something wrong or is this what always happens? I was hoping that IPN would stop this happening but it still shows the same.

 

Any further info on this would be great.

 

thanks

Link to comment
Share on other sites

Funny i was about to post about this issue too.

 

In MS1 and even in eth MS2 basic or IPN shows the "Payment For: company name"

 

One reason i think its like this is cus since a customer would buy more than one product then what would the payment be for?

 

For basic i see how this would be a problem since if they dont hit continue.

 

I had to email many customers many times to find out what they have bought.

 

Only solution to this i see is a assigned order number or ID which would be for "Payment For:" like Payment For: Order-ID 385T.

 

Hope it can be done some way.

Link to comment
Share on other sites

Just in case someone doesn't click continue to get back to your site

here is a mod to include into your PayPal module to you can see what the customer ordered on your PayPal payment notification (just in case they don't return to your site to complete the process and generate an invoice) -

 

BACK UP BACK UP BACK UP

 

change the following code:

 

function process_button() {

global $order, $currencies, $currency;

 

if (MODULE_PAYMENT_PAYPAL_CURRENCY == 'Selected Currency') {

$my_currency = $currency;

} else {

$my_currency = substr(MODULE_PAYMENT_PAYPAL_CURRENCY, 5);

}

if (!in_array($my_currency, array('CAD', 'EUR', 'GBP', 'JPY', 'USD'))) {

$my_currency = 'USD';

}

$xx = '';

for ($i=0; $i<sizeof($order->products); $i++) {

$xx .= $order->products[$i]['qty'] . '-' . ($order->products[$i]['name']) . '**';

}

$process_button_string = tep_draw_hidden_field('cmd', '_xclick') .

tep_draw_hidden_field('business', MODULE_PAYMENT_PAYPAL_ID) .

tep_draw_hidden_field('item_name', STORE_NAME . ' ' . $xx) .

tep_draw_hidden_field('amount', number_format(($order->info['total'] - $order->info['shipping_cost']) * $currencies->get_value($my_currency), $currencies->get_decimal_places($my_currency))) .

tep_draw_hidden_field('shipping', number_format($order->info['shipping_cost'] * $currencies->get_value($my_currency), $currencies->get_decimal_places($my_currency))) .

tep_draw_hidden_field('currency_code', $my_currency) .

tep_draw_hidden_field('return', tep_href_link(FILENAME_CHECKOUT_PROCESS, '', 'SSL')) .

tep_draw_hidden_field('cancel_return', tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL'));

 

return $process_button_string;

}

 

 

the above code snippet replaces the code snippet in the catalog/includes/modules/payment/paypal.php file

 

look for

 

function process_button() {

 

and then copy and paste and replace that section of code with the code above

___________

Link to comment
Share on other sites

I have to say this.

 

Open source is great. The amount of work put into this (OSC) is amazing. The features available are luring.

 

But there's a few major problems:

 

Attribute and Product sorting are basic to alot of e-stores. Having to rely on user contribs that usually only work (out of the box) with certain snapshots in order to fill these shortcomings is at best time consuming, frustrating, and annoying.

 

Having a central DB for common product attributes is convenient (sometimes), but the attributes should be allowed to be added right in the product add/edit (one time attributes), and no matter what -- the store owner/admin should be able to sort these in any way they so choose.

 

Now I learn that the PayPal module has it's own shortcomings. How can you develop something based on assumption? -- Assuming the customer will click "continue" after they've paid. Only then will the invoice be generated and mailed to you so you know what the heck they ordered. You can't assume they'll "complete" the process after paying.

 

I don't even want to get into product images -- the same image used in 3 different sizes? Common knowledge: browsers do not render resized images (with 'width' and 'height' attributes) properly -- so it looks like crap and very unprofessional. Yet again, I must seek out a contrib to fix this shortcoming.

 

The time I've spent on trying my hardest to like this "software" and get it to work, I could have been coding my own that meets my needs. I was naive to think that such a broad based "software" could fill my needs.

 

I am an intermediate PHP programmer at best, and so I turned to an existing solution. Even at my skill level I could have created something by now that suited my needs AND worked as expected. "Feature rich" doesn't always mean better when the existing features are implemented in a half-assed manner.

 

One thing I've noticed about OSC is that it assumes the customer is Internet savy, when all surveys/statistics/etc point out that it's quite the opposite.

 

This is in no way a rip on the OSC developer team, I'm sure alot of people are sastified with using it out of the box. I just think instead of trying to code new features, you should fine tune the existing ones.

 

As for me, I will now spend my valuable time coding my own cart. You have a great community here, and a potential winner of a products -- hopefully you can capatilze on both.

Link to comment
Share on other sites

I mustr say nice view on osc Aric.

 

Now I learn that the PayPal module has it's own shortcomings. How can you develop something based on assumption? -- Assuming the customer will click "continue" after they've paid. Only then will the invoice be generated and mailed to you so you know what the heck they ordered. You can't assume they'll "complete" the process after paying.

 

I know what you mean here. Ide rather have the invoice be made when the customer completes the payment which makes everything way easier.

 

I don't even want to get into product images -- the same image used in 3 different sizes? Common knowledge: browsers do not render resized images (with 'width' and 'height' attributes) properly -- so it looks like crap and very unprofessional. Yet again, I must seek out a contrib to fix this shortcoming.

Well i kinda like its like this because this is what makes osc very great. You get to use a contribution for this.

I dont believe all would like the same image treament so a most common one is implimented.

What i added to this is:

For the catalog images i use small. For the product info i use medium and then large or anything else if the customer wishes to view more.

 

One thing I've noticed about OSC is that it assumes the customer is Internet savy, when all surveys/statistics/etc point out that it's quite the opposite.

Well as i see it osc like many others try to make it very comfortable and informative for your shopping experience.

If you aint that well understanding the purchasing procedures online then i dont think you should be buying anything from online at all.

One surfing has to know what they are doing sooner or later and if they wish to buy something online then they must learn how to do this also.

At least have someone that knows where its safe to buy and submit your personal info so you may not make any mistakes.

The shopping options appear very clear wheather they are functioning correctly or not. Its your choise, but i believe with osc and many other software shops that with customer internet savy or not must feel comfortable and informed of the options they choose and agree to.

 

As for me, I will now spend my valuable time coding my own cart. You have a great community here, and a potential winner of a products -- hopefully you can capatilze on both.

 

Wish you luck.

Link to comment
Share on other sites

One thing to keep in mind is the OSC is very much still a work in progress.

 

That Attribute Sorter and Copier I believe is being integrated into the core, so this issue is already being addressed.

 

The paypal issue is *not* a problem with the payment module, but rather a fundamental flaw with the way PayPal works. They *refuse* to send a notification to OSC that indicates that payment has been made until the customer clicks 'continue'. If the payment gateway doesn't tell you when a payment has been made, it's going to be kind of hard for OSC to finish the order. I will completly agree that support for the IPN module should be integrated into the core, and I believe that steps are being taken to make it so. Kepp in mind that PayPal's IPN is still only about a year old.

 

 

I'm not sure what you mean by assuming that the customer is internet savy. The most complicated part of the checkout is understanding the difference between a 'shipping address' and a 'billing address', which is a fundamental part of ordering online.

 

I'm also a Level II Programmer/Analyst, and one thing I understand and appreciate is that these guys *are not* getting paid, and therefore are doing an awful lot of work for a 'side project'. I've checked out several other open source solutions, and this one is by far the most complete. And even at my skill level, it would probably take me a full month to write my own cart, and honestly, my time is worth more than that.

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

NOTE: As of Oct 2006, I'm not as active in this forum as I used to be, but I still work with osC quite a bit.

If you have a question about any of my posts here, your best bet is to contact me though either Email or PM in my profile, and I'll be happy to help.

Link to comment
Share on other sites

I agree with you and I'm not trying to put OSC down at all. To put that amount of work into a project on a volunteer basis is something to admire and appreciate.

 

I'm just getting a couple things off my chest. I'll definitely keep working with it on an testing basis and I hope that some of these gripes become part of the core.

 

Contributions are great. I love addons as much as the next guy -- I just feel most, if not all, of the things I mentioned above are fundemental to any shopping cart and one shouldn't have to rely on possibly outdated contribs to fix the problems.. not to mention alot of them have to be re-added (if available) to OSC milestones/releases.

 

For the time being I just believe I'll be better served with a tailor made (albeit basic) script/cart for my project.

 

Again, this is in no way a rip on the hardworking, non-paid developers. You can bet I'll be hovering around the site waiting for the 2.2 final :)

Link to comment
Share on other sites

the way i wrote the original modification is:

 

function process_button() {

global $order, $currencies, $currency;

 

if (MODULE_PAYMENT_PAYPAL_CURRENCY == 'Selected Currency') {

$my_currency = $currency;

} else {

$my_currency = substr(MODULE_PAYMENT_PAYPAL_CURRENCY, 5);

}

if (!in_array($my_currency, array('CAD', 'EUR', 'GBP', 'JPY', 'USD'))) {

$my_currency = 'USD';

}

$xx = '';

for ($i=0; $i<sizeof($order->products); $i++) {

$xx .= $order->products[$i]['qty'] . '-' . ($order->products[$i]['name']) . '**';

}

$process_button_string = tep_draw_hidden_field('cmd', '_xclick') . tep_draw_hidden_field('business', MODULE_PAYMENT_PAYPAL_ID) . tep_draw_hidden_field('item_name', STORE_NAME . ' ' . $xx) .tep_draw_hidden_field('amount', number_format(($order->info['total'] - $order->info['shipping_cost']) * $currencies->get_value($my_currency), $currencies->get_decimal_places($my_currency))) . tep_draw_hidden_field('shipping', number_format($order->info['shipping_cost'] * $currencies->get_value($my_currency), $currencies->get_decimal_places($my_currency))) . tep_draw_hidden_field('currency_code', $my_currency) . tep_draw_hidden_field('return', tep_href_link(FILENAME_CHECKOUT_PROCESS, '', 'SSL')) . tep_draw_hidden_field('cancel_return', tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL'));

 

return $process_button_string;

}

 

this works with the standard paypal module but will not work with paypal ipn as the structure of the data that gets passed is different

 

the $xx variable is used to parse the order and collect the information and then pass it to the paypal module so that when you receive a payment notification you will receive a list of the product(s) ordered in case the customer does not complete the paypal process and return to your site (so no invoice is generated by OSC)

 

here is the original thread:

 

http://www.oscommerce.com/forums/viewtopic.php...ighlight=paypal

Link to comment
Share on other sites

and the purpose if to pass what is in the customers order to paypal so it appears on the payment notification email you receive

 

its so nice to help people... :wink:

Link to comment
Share on other sites

So I must take your hack, and hack it more to suit my purposes?

 

It is nice to help people without saying things like "well, you can always ammend the attributes to the list passed by parsing that information also" assuming people know how to do this.

 

I appreciate all contribs -- but these kinds of comments assume that every OSC user knows what they are doing with the code and basically pass it off as "I did my part - you do your part now".

Link to comment
Share on other sites

your response was basically "well it doesnt fit my requirement so what good is it?"

 

that certainly makes people that write contributions feel good about trying to help others and is the reason why many people don't write them any more

 

it would be more useful to say, "well, your contribution adds something but is also missing a piece that i could use and is there a way to add that to the contribution?"

 

i write mods when people ask for a solution, and this particular solution was what everyone wanted - to add a list of products ordered to the standard paypal email so if the customer did not complete the order process and return to the site, then at least they could see what the person ordered without having to hunt down the customer and ask them what they ordered - this was also part of the reason the paypal ipn contribution was written

 

we get 100's of requests to do things, and we try to fulfill requests as we can

 

i do not feel 'obligated' to do anything, i do what i do because i want to give to the OSC group, but you can't please everyone, and so we do what we do, and then try to fill in any blank spaces as they arise

 

asking nicely works wonderful

Link to comment
Share on other sites

So I must take your hack, and hack it more to suit my purposes?  

 

It is nice to help people without saying things like "well, you can always ammend the attributes to the list passed by parsing that information also" assuming people know how to do this.

 

I appreciate all contribs -- but these kinds of comments assume that every OSC user knows what they are doing with the code and basically pass it off as "I did my part - you do your part now".

 

Many contribution authors are not even active on these boards anymore. So if something doesn't fit your needs, you may have to hire a programer to make it work. (Don't look at me, I don't code).

 

You are working with free software with free support. Some things are beyond our skills and beyond our availabity of free time.

 

And the majority of the time, when installing contributions to the core you WILL have to "hack the hack" to make it do what you need.

 

And that is the beauty of open source. You have the code, you can change it or have someone change it for you.

 

So, yes, it is time for you (or someone else) to do your part.

[no external urls in signatures please, kthanks]

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...