Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution]Paypal IPN - Devosc


devosc

Recommended Posts

ok if i back switch to aggregate it works well but there's is no "tax field" in paypal just it is included in total.

 

but great now the price in my shop is the same of paypal and that's "WORKING" like i want.

 

good luck to all e mercants

Link to comment
Share on other sites

  • Replies 2.1k
  • Created
  • Last Reply

Top Posters In This Topic

I've installed a PayPal Shopping Cart IPN v3.1.5. I set Shopping Cart Method in admin-->payment-->paypal to Aggregate. My Order Total is:

 

Sub-Total 1

Tax 2

Handling Fee 3

Shipping 4

Shipping Insurance 5

Global Quantity Discount 6

Discount Coupons 7

Gift Vouchers 8

Total 9

 

My problem is that PayPal doesn't include a Shipping Insurance into Total Amount.

My osc checkout says:

 

Sub-Total: $200.00

Sales Tax: $16.50

Handling Fee: $5.00

Shipping: $52.01

Shipping Insurance: $6.60

Total: $280.11

 

When I'm transfered to PayPal I have:

 

Pay To:  Company 

Payment For:  Company

 

Amount: 221.50

Shipping & Handling: $52.01

Total Amount: $273.51

 

Amount includes Sub-Total, Sales Tax, Handling Fee, Coupon Discount (if available). Shipping & Handling includes just shipping charge.

Unfortunately, the Shipping Insurance that I offer through my osc is not included in Total Amount.

What should I change to have PayPal include a Shipping Insurance into Total Amount? And is it possible to change an appearance of PayPal rows, like:

 

Pay To:  Company 

Payment For:  Company

 

Amount: $200.00 (show just Sub-Total and Coupon Discount (if any))

Shipping & Handling: $63.61 (show Shipping, Handling, and Shipping Insurance)

Sales Tax: $16.50

Total Amount: $280.11

 

Please help me to make it work perfectly. :rolleyes:

Thanks in advance.

Irina.

Link to comment
Share on other sites

Currently I have a business Paypal Account - which obviously allows users to pay via CC/Debit cards.

 

Is it possible (or recommended) to set up another paypal account so there are no charges? And have the 'main' paypal account as the one that takes CC payment?

 

 

If it's possible to use the IPN contrib to do this, or if anyone else has - please yell =)

 

 

Thanks

Link to comment
Share on other sites

Please answer this and show that this thread is for more than just posting questions.

 

Easy quick questions for those who say they know IPN:

 

Does IPN eliminate the need for the user to click continue or allow him to close the paypal window but still completes the transaction????

 

When does PAYPAL use the IPN info passed to it from the form to reply to my server?

After the customer hits pay and before the continue button is pressed?

Link to comment
Share on other sites

Please answer this and show that this thread is for more than just posting questions.

 

Unfortunately based on the last 20 messages (unanswered tech problems/questions) it seems like that is exactly what it is for... :(

Edited by dr_lucas
Link to comment
Share on other sites

Hello

 

Ive just installed the latest version:

PayPal_Shopping_Cart_IPN_v3.1.5

 

on a test osc shop and connected to sandbox etc, all seems to be working

 

My Question is Can Paypal handle recurring payments??

 

If yes how do i configure the new module to allow for recurring payments.

Link to comment
Share on other sites

I've just got the Paypal IPN installed and I'd like to add a few tips that I didn't realize before hand that maybe I missed in the instructions or this forum topic.

 

My transactions were showing up as "unclaimed"

 

Before you can get it to work:

 

1. Make sure that on the business Paypal account that you confirm your email address.

2. Make sure that you verify the account.

 

NOTE: When you login to the Sandbox, there will be a menu bar at the top. One of these menu items is "Email." There are no real Emails generated by Oscommerce or Paypal Sandbox when testing. Only Emails generated by Paypal Sandbox - which show up in this menu item.

 

It all started to work fine after this.

 

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

 

One question that I have. I noticed that in the Oscommerce Admin console the order showed up as "processing" after the payment was received.

 

My shipping staff uses the "SHIP" button in Paypal because it will deduct USPS shipping directly from your paypal account and you can print your postage easily and drop the package in the mail.

 

Since there is no way to test this in the Sandbox,.... does anyone know if once, you follow the "SHIP" procedure in paypal if it will pass any details back to Oscommerce, or must my shipping staff go into the Oscommerce admin console and change the status to shipped?

 

Thanks for any info.

 

Additionally, thanks for the developers on this one. This instructions for this one were top notch! The Check Boxes and the Begin/End comments for the constribution are brilliant in the installation instructions.

 

I have been trying to get a couple of other contributions to work - QT Pro for example, and have yet been unsuccessful because the contribution was so scattered (base contribution, plus 2 "patches") and loosely documented

 

Thanks Again!!!

Edited by cookie
Link to comment
Share on other sites

qscreations or cookie,

 

Could you please answer post #1649 above

 

I don't know how to tell if my site is getting hit with ipn.

Do you have a table for ipn payments? Maybe I need to restart this all from scratch (3rd time)

 

Try this test-

Just before final check out on your site

open another window to your shopping cart

Check out in the first window and pay at paypal but do not click continue.

The purpose of IPN is so users can close paypal at that point and not come back to your site but your site still gets notified.

 

I appears people are thinking their IPN is working but it is not if you can refresh the window showing your cart and the cart contents are still there after the payment was completed (but continue not clicked)

If this happens (you can see a post where he says it happens 50% of the time- the users don't click continue at paypal) then you have a mess to deal with.

Edited by slofly
Link to comment
Share on other sites

qscreations or cookie,

 

Could you please answer post #1649 above

 

I don't know how to tell if my site is getting hit with ipn.

Do you have a table for ipn payments? Maybe I need to restart this all from scratch (3rd time)

 

Try this test-

Just before final check out on your site

open another window to your shopping cart

Check out in the first window and pay at paypal but do not click continue.

The purpose of IPN is so users can close paypal at that point and not come back to your site but your site still gets notified.

 

I appears people are thinking their IPN is working but it is not if you can refresh the window showing your cart and the cart contents are still there after the payment was completed (but continue not clicked)

If this happens (you can see a post where he says it happens 50% of the time- the users don't click continue at paypal) then you have a mess to deal with.

 

Hmm, I don't know. I'll have to re-test (tomorrow).

 

I was able to do a successful payment completion to the SAndbox. Then I would click "return to merchant" or "continue" or something along those lines and was brought back to my site. the shopping cart contents were in fact emptied and I had an order history item.

 

After I was satisfied with the testing on sandbox, I turned off test mode and created an order with the live paypal site. I went as far as the payment page, but "canceled" the order at the last possible step. This returned me to my site, and there were still in fact shopping cart contents in my shopping cart.

 

I was also able to resume a previous order after logging off of Oscommerce and logging back in.

 

I don't know if that fully answers your questions.

Link to comment
Share on other sites

people have a hard time understanding this question yet it is based on the purpose of IPN's reason for being created.

 

'I was able to do a successful payment completion to the SAndbox. Then I would click "return to merchant" or "continue" or something along those lines and was brought back to my site. the shopping cart contents were in fact emptied and I had an order history item.'

 

When you clicked continue you notified by form your site that there was a completed payment- this does not use IPN. IPN is sent by the paypal server without the need of a form button being clicked. It lets the user close paypal without clicking continue.

 

Say you have 2 items in stock.

 

I purchase 2 of them, click pay at paypal but then don't click continue.

You see the payment in paypal and send me the items.

The site doesn't subtract the inventory after they pay because they didn't click continue but closed the window.

1 minute later someone else buys 2 items but you already sold 2 of them- hell breaks loose.

Link to comment
Share on other sites

Hi :)

 

The paypal ipn module works fine for us except one thing. We wish to accept payment only in AUD. Have set that in module edit from oscomm admin but when we get to Paypal it is still billing in USD. The exchange rate is not so favourable so we do not want the customer billed in USD we would rather keep all transactions in AUD.

 

How do we fix this?

Thank you

Carolyn

Link to comment
Share on other sites

people have a hard time understanding this question yet it is based on the purpose of IPN's reason for being created.

 

'I was able to do a successful payment completion to the SAndbox. Then I would click "return to merchant" or "continue" or something along those lines and was brought back to my site. the shopping cart contents were in fact emptied and I had an order history item.'

 

When you clicked continue you notified by form your site that there was a completed payment- this does not use IPN. IPN is sent by the paypal server without the need of a form button being clicked. It lets the user close paypal without clicking continue.

 

Say you have 2 items in stock.

 

I purchase 2 of them, click pay at paypal but then don't click continue.

You see the payment in paypal and send me the items.

The site doesn't subtract the inventory after they pay because they didn't click continue but closed the window.

1 minute later someone else buys 2 items but you already sold 2 of them- hell breaks loose.

 

 

I went back in and tested this.

 

and then I realized what you were saying, and I retested this.

 

I had 49 of one item. I went through the order process. It went to paypal, and I paid. The one thing that I notice here is that it does not open a new browser window (or tab in firefox). It uses the same window.

 

So if your users are in fact just closing the window, they are closing down their web browsing experience. It seems that this problem might also occur to you if the end-user typed a new URL in the address bar instead of clicking "return to merchant"

 

It is working fine for me. I'm not having that problem. The payment went through and it subtracted the stock from my inventory.

Link to comment
Share on other sites

Is anyone using this Paypal IPN module with QT Pro?

 

Now that I've got the Paypal IPN setup and working, I'm going to embark on QT Pro. I tried it once before and couldn't get it to work, but now that I've had alot more experience with Oscommerce, I'd like to try it again.

 

I'm running an apparel website, and I need inventorying based upon product attributes.

 

Example. Men's shirt will have two attributes, color and size. I need to do inventory on each color's size. Otherwise, Oscommerce is kind of useless if you have an apparel site.

 

Anyways, thanks again for the development of this payment module. Top Notch.

 

The only weird thing that I did notice is that when I had 1 item (say a hat) and an order went through with the new Paypal IPN module. When I the test customer returned back to my site, the Hat had disappeared, and looking around in the admin console, the hat had been set as inactive...even though I've set Oscommerce to display out of stock prodcuts.

 

Any ideas on out of stock products?

 

My other out of stock products are showing up, but since this one was "processed" it was set as inactive.

Link to comment
Share on other sites

Your payment went through and the cart got emptied without you having to click on continue?

 

Which IPN are you using?

http://www.oscommerce.com/community/contri...ry,1/search,ipn

12 Jan 2005 - osCommerce PayPal IPN Module v1.1 For 2.2MS2??

or the newer updates higher on the page?

 

Thanks!

 

The payment went through and it subtracted the stock from my inventory.

Link to comment
Share on other sites

Or there is a different page with

PayPal_Shopping_Cart_IPN_v3.1.5

http://www.oscommerce.com/community/contri...ry,1/search,ipn

 

It appears if OSC is installed fresh you can use the write and run folder to avoid having to insert all the lines.

 

I used the following file:

PayPal_Shopping_Cart_IPN_v3.1.5.zip

 

File size: 345KB

 

I copied and pasted the changes into the core files. I did not copy and overwrite.

 

The install checklist is very good.

Link to comment
Share on other sites

Did you figure out how to open paypal in a new window? Can anyone help me with that as paypal is not fond of Iframes, thanks.

 

 

I am running osCommerce inside an inline frame and using Paypal IPN v2.9

 

When the redirect to the paypal information pages occurs the paypal pages are too big for the inline frame I would like to either resize the paypal pages or display the information in a new window as the but I am not sure how to write the code, the inline frame size needs to remain fixed.

 

Is this possible?

 

I've sorted it out? thanks

Edited by sharkey
Link to comment
Share on other sites

i have installed the Paypal IPN (v3.1.5 tar.gz) as per instructions and it seems to work almost.. however i am getting these problems..

 

When checking out and completeing (using the paypal Sandbox) the contents of the cart remains in the cart when returning back to the site and it does not clear the cart contents.

 

And I can't see any new order in the orders section.

 

What could be wrong?

 

Thank you for any advice!

 

I've installed the contribution twice but I still have the same problem!

Link to comment
Share on other sites

Hi :)

 

The paypal ipn module works fine for us except one thing. We wish to accept payment only in AUD. Have set that in module edit from oscomm admin but when we get to Paypal it is still billing in USD. The exchange rate is not so favourable so we do not want  the customer billed in USD we would rather keep all transactions in AUD.

 

How do we fix this?

Thank you

Carolyn

Sorted out the problem:

 

english.php needs to have the default language currency changed to the currency you want used by Paypal.

 

// if USE_DEFAULT_LANGUAGE_CURRENCY is true, use the following currency, instead of the applications default currency (used when changing language)
define('LANGUAGE_CURRENCY', 'USD');

 

Cheers

Caz

Link to comment
Share on other sites

Does anyone know how to make line 354 in checkout_confirmation.php open a new window? I have tried very very unsuccessfully.

 

Thanks

 

$form_action_url = tep_href_link(FILENAME_CHECKOUT_PROCESS, '', 'SSL');

 

I tried several steps including the below mess to no avail.

 

$form_action_url = '<a href="' . tep_href_link(FILENAME_CHECKOUT_PROCESS, '', 'SSL') . '" target="_blank">' . '</a>';

 

I got the idea from another mod that shows this code to open a window.

 

<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $random_product['products_id']) . '" target="_blank">' . $random_product['products_name'] . '</a>

Link to comment
Share on other sites

As far as I can make out you need to edit 3 files.

 

includes/functions/html.output.php add the target parameter to the form tag.

// Output a form
 function tep_draw_form($name, $action, $method = 'post', $parameters = '') {
   $form = '<form name="' . tep_output_string($name) .  '" action="' . tep_output_string($action) . '" method="' . tep_output_string($method) . '" target="' . tep_output_string($target) .  '"';

   if (tep_not_null($parameters)) $form .= ' ' . $parameters;

   $form .= '>';

   return $form;
 }

 

catalog/checkout_confirmation.php around line 311

if (isset($$payment->form_action_url)) {
   $form_action_url = $$payment->form_action_url;
   $target = $$payment->target_window;
 } else {
   $form_action_url = tep_href_link(FILENAME_CHECKOUT_PROCESS, '', 'SSL');
 }

 

paypal_ipn.php around line 33

if (MODULE_PAYMENT_PAYPAL_IPN_GATEWAY_SERVER == 'Live') {
       $this->form_action_url = 'https://www.paypal.com/cgi-bin/webscr';
       $this->target_window = '_blank';
     } else {
       $this->form_action_url = 'https://www.sandbox.paypal.com/cgi-bin/webscr';
     }

 

I think that will insert the target="_blank" which you need in the form tag for the checkout confirmation button but I haven't tested it :)

 

Cheers

Caz

 

 

 

 

Does anyone know how to make line 354 in checkout_confirmation.php open a new window?  I have tried very very unsuccessfully.

 

Thanks

 

$form_action_url = tep_href_link(FILENAME_CHECKOUT_PROCESS, '', 'SSL');

 

I tried several steps including the below mess to no avail.

 

$form_action_url = '<a href="' . tep_href_link(FILENAME_CHECKOUT_PROCESS, '', 'SSL') . '" target="_blank">' . '</a>';

 

I got the idea from another mod that shows this code to open a window.

 

<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $random_product['products_id']) . '" target="_blank">' . $random_product['products_name'] . '</a>

Link to comment
Share on other sites

Since installing a version of IPN i keep getting this message on all pages in the admin area. Even on the invoices which means i cant print them off.

Please help.

 

Nick

 

 

1062 - Duplicate entry '4493796e7f8e3db0e2583ec75b29e6dd' for key 1

 

insert into sessions values ('4493796e7f8e3db0e2583ec75b29e6dd?action=view?action=view?action=view?action=view', '1115276725', 'language|s:7:\"english\";languages_id|s:1:\"1\";selected_box|s:13:\"configuration\";')

 

[TEP STOP]

Link to comment
Share on other sites

Thanks for your help.

 

Stupid question, where's paypal_ipn.php?

 

 

 

As far as I can make out you need to edit 3 files.

 

includes/functions/html.output.php  add the target parameter to the form tag.

// Output a form
?function tep_draw_form($name, $action, $method = 'post', $parameters = '') {
? ?$form = '<form name="' . tep_output_string($name) . ?'" action="' . tep_output_string($action) . '" method="' . tep_output_string($method) . '" target="' . tep_output_string($target) . ?'"';

? ?if (tep_not_null($parameters)) $form .= ' ' . $parameters;

? ?$form .= '>';

? ?return $form;
?}

 

catalog/checkout_confirmation.php around line 311

if (isset($$payment->form_action_url)) {
? ?$form_action_url = $$payment->form_action_url;
? ?$target = $$payment->target_window;
?} else {
? ?$form_action_url = tep_href_link(FILENAME_CHECKOUT_PROCESS, '', 'SSL');
?}

 

paypal_ipn.php around line 33

if (MODULE_PAYMENT_PAYPAL_IPN_GATEWAY_SERVER == 'Live') {
? ? ? ?$this->form_action_url = 'https://www.paypal.com/cgi-bin/webscr';
? ? ? ?$this->target_window = '_blank';
? ? ?} else {
? ? ? ?$this->form_action_url = 'https://www.sandbox.paypal.com/cgi-bin/webscr';
? ? ?}

 

I think that will insert the target="_blank" which you need in the form tag for the checkout confirmation button but I haven't tested it :)

 

Cheers

Caz

Link to comment
Share on other sites

Since installing a version of IPN i keep getting this message on all pages in the admin area. Even on the invoices which means i cant print them off.

Please help.

 

Nick

1062 - Duplicate entry '4493796e7f8e3db0e2583ec75b29e6dd' for key 1

 

insert into sessions values ('4493796e7f8e3db0e2583ec75b29e6dd?action=view?action=view?action=view?action=view', '1115276725', 'language|s:7:\"english\";languages_id|s:1:\"1\";selected_box|s:13:\"configuration\";')

 

[TEP STOP]

 

 

I have fixed the problem above by following the instructions on the following link.

 

http://www.oscommerce.com/forums/index.php?showtopic=128662

 

Nick

Link to comment
Share on other sites

Hello,

Can somebody please help me out here. When I'm redirected to PayPal I have:

 

Pay To:  Company 

Payment For:  Company

 

Amount:

Shipping & Handling:

Total Amount:

Amount includes Sub-Total, Sales Tax, Handling Fee, Shipping Insurance, and Coupon Discount (if available). Shipping & Handling includes just shipping charge.

How can I make the PayPal to calculate Shipping, Handling, and Shipping Insurance under Shipping & Handling and Sales Tax show separately. Here is what I mean:

Pay To:  Company 

Payment For:  Company

 

Amount: (show just Sub-Total and Coupon Discount (if any))

Shipping & Handling: (show Shipping, Handling, and Shipping Insurance)

Sales Tax: (show Sales Tax)

Total Amount:

I'll appreciate your responses. :blush:

Thanks in advance.

Irina.

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