Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Official PayPal IPN Support Thread


Mark Evans

Recommended Posts

Change to a decent host? Alternatively, if you insist at staying at GoDaddy try Brian's solution from post 1340 on page 67 in this thread (quoted above for easy reference). Terra

 

I'd love to change, unfortunately the person i'm working on this for wants to stay with GoDaddy hmm big problem. I have tried the solution mentioned above, however no luck.

 

On a different angle, for this to work, does the "Enable Encrypted Web Payments" need to be set to true? Currently it is set to false.

 

I had big problems trying to work out how to use the ssl certificate and what the process is to get the values for:

Your Private Key

 

Your Public Certificate

 

(PayPals Public Certificate

/includes/ppalcert/paypal_cert_pem.txt) - I've got that ok

 

Your PayPal Public Certificate ID

 

The site owner has bought a Turbo SSL with godaddy - Could someone point me in the right direction of how to actually go about organising the SSL certificate to be usable with this setup? I'm very new to ssl.

 

Thanks again

Link to comment
Share on other sites

Everything is working fine now on my site. Thanks to Alex for all the support over here.

 

After about 5 successful customer transactions in the last day, I noticed in the latest:

 

Date Added	  Customer Notified	  Status					  Comments
10/05/2006 11:33:25 	X 	11 Downloads Now Available 	PayPal IPN Verified [Completed (Unverified; $X.XX)]

 

I am more worried about the "Customer Notified" being marked with a red cross "X"

 

In addition, in the previous orders, there used to this in the second line, which is not there in the latest one:

 

Date Added		  Customer Notified		  Status					  Comments
10/05/2006 10:19:38	  (TICK MARK)	  3 Payment processing

 

I appreciate the help.

Regards

Moonray

Link to comment
Share on other sites

Hello, my name is Eddie and I am having some difficulty getting the PayPal IPN to work correctly on my site.

 

I am using the latest release, I have it enabled and have edited it to contain my PayPal seller email address. The order shows up in the Admin area, but I never receive anything back from PayPal letting me know if the order is valid or not. I do not have a SSL certificate, so I did not fill in the private key, public certificate, PayPal's public certificate, or a PayPal public certificate ID.

 

I was not sure if I needed a working directory for temporary files or not. The information about the temporary directory does not say if that is needed for SSL secure sites or unsecure sites or both, so I left that field blank. I have since then created a temporary directory named paypaltmp and point to it like this: public_HTML/catalog/paypaltmp/. The OpenSSL Location field is already filled in with this information: /usr/bin/openssl, so I left it alone even though I do not have a SSL certificate.

 

I have enabled auto return on PayPal's site and have even enabled PayPal IPN and have pointed it to this URL: http://www.giftscollectiblesmore.com/catalog/ext/modules/payment/paypal_ipn/ipn.php.

 

Is there anything wrong with the way that this is set up? If so please show me all of my errors and how I can correct them. Thank you.

 

Eddie Swift

Edited by eswift
Link to comment
Share on other sites

Has anyone managed to get the Paypal_IPN to display the order contents in Paypal rather than the store name for the "Item Description"

 

 

I know there is one for the standard paypal, which I am trying to play with, but just wondered if there was one already working.

 

Thanks

Link to comment
Share on other sites

I managed to get the correct paypal description to shop in the paypal order screen

 

I modified this contrid

http://www.oscommerce.com/community/contributions,3376

 

The only change I had to make ot the original contrib was this bit

 

From

In File:
\catalog\includes\modules\payment\paypal.php

FIND AROUND LINE 88:

	tep_draw_hidden_field('item_name', STORE_NAME) .	

REPLACE WITH:

tep_draw_hidden_field('item_name', $_SESSION['FixOrder']) .

 

to

 

In File:
\catalog\includes\modules\payment\paypal_ipn.php

FIND 

	$parameters['item_name'] = STORE_NAME;	

REPLACE WITH:

	$parameters['item_name'] = $_SESSION['FixOrder'];

Link to comment
Share on other sites

Hi

 

I have installed this contrib but want some info on how to use it.

 

I have it enabled but I don't have a SSL certificate, so I did not fill in the private key, public certificate, PayPal's public certificate, or a PayPal public certificate ID. I left the fields below this blank as well.

 

I have created a PP sandbox account to test my site but before I go ahead and purchase anything is it safe to do so as in my card won't get charged.

 

Many thanks

 

Ian

Link to comment
Share on other sites

Fatal error: Cannot redeclare class order_total in /home/virtual/site2/fst/var/www/html/includes/classes/order_total.php on line 13

 

I just upgraded to version 1.3 from 1.1 (which was working fine) because of a new install of CCGV, and upon automatic return to checkout_process.php from the Paypal site I get the above error. I did some searching and found a "fix" for that error but that produced another error which is very similar to the above but now in the ot_subtotal.php file.

 

I have been unable to find (through searching and reading page after page of this massive thread) a solution to this problem. Anyone have the answer?

Link to comment
Share on other sites

Hi

 

I have installed this contrib but want some info on how to use it.

 

I have it enabled but I don't have a SSL certificate, so I did not fill in the private key, public certificate, PayPal's public certificate, or a PayPal public certificate ID. I left the fields below this blank as well.

 

I have created a PP sandbox account to test my site but before I go ahead and purchase anything is it safe to do so as in my card won't get charged.

 

Many thanks

 

Ian

 

Ian,

In order to test in the sandbox, you must create two sandbox accounts. One must be a Premier or Business account that will receive test payments, while the other can be any type that you will use to buy things from your store during testing. You cannot buy things through the sandbox using your real PayPal account.

 

Put the business account information into the settings for this module. Use the second account during checkout.

 

When you add a credit card to the "customer" account, a dummy credit card number will be displayed. Copy down the information for that card, for use in testing. You can use this for making test purchases without creating a PayPal account.

 

Don't use real credit card numbers in the sandbox, since PayPal provides dummy numbers. To get additional dummy numbers, just add another card to the customer account.

 

Note that you must be logged in to developer.paypal.com (in another browser window) to use the sandbox. This trips some people up during testing.

 

--Glen

Link to comment
Share on other sites

Easy contrib, but it has a flaw.

 

I have a digital download store and, when you ae at the checkout confirmation page, all a data hief has to do is VIEW SOURCE of the page and he can instantly view the return URL.

All he then has to do is go to paypal, then enter the return URL into his browser, hit go and he gets the downloadable product without paying.

Link to comment
Share on other sites

Hello,

 

I have been using this contribution for a while now, but there's one little problem that has been alluded to elsewhere on this site that's now causing serious headaches for us.

 

Customers are using the order comments field to store individual information as part of an order for personalised a item - this is fine - we ask them to do that. However, with the best will in the world, not everyone will press that crucial "complete your order confirmation" button in Paypal. Now granted, with this contribution we do receive order details regardless of this final button press - but what we don't get is the order comments... It's getting a little embarassing having to contact clients after placement of the order for details they had already provided.

 

Can anyone suggest a way of storing the customers comments with the order, ideally - prior to jumping through to Paypal?

 

Thank you.

 

Kind regards,

Gary.

Link to comment
Share on other sites

I just upgraded to version 1.3 from 1.1 (which was working fine) because of a new install of CCGV, and upon automatic return to checkout_process.php from the Paypal site I get the above error. I did some searching and found a "fix" for that error but that produced another error which is very similar to the above but now in the ot_subtotal.php file.

 

I have been unable to find (through searching and reading page after page of this massive thread) a solution to this problem. Anyone have the answer?

 

Ok, now I'm more confused. I removed 1.3 and reinstalled version 1.1, but I still get the same error:

 

"Fatal error: Cannot redeclare class order_total in /home/virtual/site2/fst/var/www/html/includes/classes/order_total.php on line 13"

 

So it seems that PayPal IPN 1.3 isn't causing this after all, yet it only showed up after installing 1.3. I don't have a clue as to how to begin debugging this.

Link to comment
Share on other sites

Ok, now I'm more confused. I removed 1.3 and reinstalled version 1.1, but I still get the same error:

 

"Fatal error: Cannot redeclare class order_total in /home/virtual/site2/fst/var/www/html/includes/classes/order_total.php on line 13"

 

So it seems that PayPal IPN 1.3 isn't causing this after all, yet it only showed up after installing 1.3. I don't have a clue as to how to begin debugging this.

 

a quick and dirty way of fixing it is to look for the lines that include the order_total.php and change them

include -> include_once

require -> require_once

Link to comment
Share on other sites

I have got everything working.

 

Just a few questions:

 

1. I allow free upgrades for life, for all software downloads. So the download link has to be active forever. How do I enable that automatically for all downloads?

 

2. I do not want to limit the number of downloads to 5 or 100 or 500. How do I make it unlimited?

 

I appreciate all the help.

 

best regards

Moonray

Link to comment
Share on other sites

a quick and dirty way of fixing it is to look for the lines that include the order_total.php and change them

include -> include_once

require -> require_once

 

 

I saw a very similar fix earlier in the thread (it said to only do that in one specific spot) and did that one, and like the other guy now I get:

 

"Fatal error: Cannot redeclare class ot_subtotal in /home/virtual/site2/fst/var/www/html/includes/modules/order_total/ot_subtotal.php on line 13"

 

...which is extremely similar, but I can't find a file anywhere that tries to include or require ot_subtotal.php. I actually contacted the other guy and he said he never could figure it out and I guess he dropped paypal completely. Unfortunately, a lot of my customers want to use paypal.

Link to comment
Share on other sites

Paypal has now added Norwegian krone (NOK) to it's currency selection, and as I'm in Norway I would like my customers to be able to pay with NOK. I've been using EUR up until today. How can I add the NOK to the check-out process? Can I add it to this piece of code in includes/modules/payment/paypal.php?

 

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

 

or is it somewhere else I need to add it?

 

TIA! :)

Link to comment
Share on other sites

Paypal has now added Norwegian krone (NOK) to it's currency selection, and as I'm in Norway I would like my customers to be able to pay with NOK. I've been using EUR up until today. How can I add the NOK to the check-out process? Can I add it to this piece of code in includes/modules/payment/paypal.php?

or is it somewhere else I need to add it?

 

TIA! :)

Sorry... I think I posted this in the wrong thread :blush:

Link to comment
Share on other sites

hello, i am having problems with my stock after a person makes a order. the stock never decreases automatically after i installed this contrib. did i miss something? this is really hard for me as i cannot go in and do it manually everytime someone makes an order. i am also sure that this problem started after i installed this contrib, since i did not install anything else after that or before it.

 

thanks

Link to comment
Share on other sites

Hello

 

Could anybody help me with the following problem? Paypal supports now also Swiss francs since this week. Can anybody explain me, what I have to do, that this contrib also supports Swiss francs (CHF)?

 

Thanks!

Roland

Link to comment
Share on other sites

Hi

 

I get an error after returning to checkout_success.php (the paypal transaction goes through just fine)

 

A TEP error when call to an undefined function that resets the cart.

 

 

In checkout_success.php, I had to comment the line to avoid the ugly screen, but after this, my paypal carts are not cleaned after the transaction. (the other payment methods clean the cart just fine)

 

//begin PayPal_Shopping_Cart_IPN
} elseif (isset($HTTP_GET_VARS['payment']) && $HTTP_GET_VARS['payment'] == 'paypal') {
$cart->resetShoppingCart();
}
//end PayPal_Shopping_Cart_IPN

 

Could someone explain the difference in the logic between the 2 payment methods when it comes to clean the cart after the transaction?

Paypal IPN uses its own function to unregister the sessions: the resetShoppingcart function is located in

 

includes>modules>payment>paypal>classes and is coded as follows:

 

 function resetShoppingCart()
{

  $this->reset(true,$this->orders_id);

  $this->orders_id = 0;

  $this->txn_signature = '';

  tep_session_unregister('sendto');

  tep_session_unregister('billto');

  tep_session_unregister('shipping');

  tep_session_unregister('payment');

  tep_session_unregister('comments');

  if ( class_exists('order_total') === false ) {

	require_once(realpath(dirname(__FILE__) . '/../../../../classes/order_total.php'));

  }

  if ( is_callable(array('order_total','clear_posts')) === true ) {

	if ( is_object($GLOBALS['order_total_modules']) === false )
	  $order_total_modules = new order_total;

	$order_total_modules->clear_posts();

  }
}

 

 

Thank you for any help you could provide.

Link to comment
Share on other sites

I recently installed the PayPal IPN on a live store and I am still having problems. It seemss that my certificate and key and PayPal certificate are not being read/found. I have read through this topic, as well as the topic "PayPal IPN for Dummies". None of the suggestions (where to install the .pem files) have worked.

 

These are the error messages I am getting on the confirmation page:

 

Warning: file_get_contents(/home/Wings.pem) [function.file-get-contents]: failed to open stream: No such file or directory in /home/wings/public_html/catalog/includes/modules/payment/paypal_ipn.php on line 372

 

Warning: file_get_contents(/home/Wingskey.pem) [function.file-get-contents]: failed to open stream: No such file or directory in /home/wings/public_html/catalog/includes/modules/payment/paypal_ipn.php on line 372

 

Warning: openssl_pkcs7_sign() [function.openssl-pkcs7-sign]: error getting private key in /home/wings/public_html/catalog/includes/modules/payment/paypal_ipn.php on line 372

 

Warning: file_get_contents(/tmp/657699-18-signed.txt) [function.file-get-contents]: failed to open stream: No such file or directory in /home/wings/public_html/catalog/includes/modules/payment/paypal_ipn.php on line 377

 

Warning: file_get_contents(/home/paypal_cert_pem.txt) [function.file-get-contents]: failed to open stream: No such file or directory in /home/wings/public_html/catalog/includes/modules/payment/paypal_ipn.php on line 387

 

 

Any help or suggestions are welcome!

 

Aleena

Link to comment
Share on other sites

Hi,

 

When trying to install via the Administration > Modules > Payment section, nothing happens when I click the install button, the page just posts back to itself and the install button is still there. Do i need to apply read/write permissions to certain files or folders before this can be installed?

 

Any help is appreciated.

 

 

Thanks

Link to comment
Share on other sites

I recently installed the PayPal IPN on a live store and I am still having problems. It seemss that my certificate and key and PayPal certificate are not being read/found. I have read through this topic, as well as the topic "PayPal IPN for Dummies". None of the suggestions (where to install the .pem files) have worked.

 

These are the error messages I am getting on the confirmation page:

 

Warning: file_get_contents(/home/Wings.pem) [function.file-get-contents]: failed to open stream: No such file or directory in /home/wings/public_html/catalog/includes/modules/payment/paypal_ipn.php on line 372

 

Warning: file_get_contents(/home/Wingskey.pem) [function.file-get-contents]: failed to open stream: No such file or directory in /home/wings/public_html/catalog/includes/modules/payment/paypal_ipn.php on line 372

These two errors are the root of your problem. They are telling you that paypal_ipn.php is looking for the certificate and key files in your home directory, but didn't find them. If the files are indeed in your home directory, it is possible that Apache and the PHP engine don't have permission to access them. If they are somewhere else, you will need to change the module settings to include the full path to the files.

 

I keep my key files below my document root (public_html), but protect them with a .htaccess file that denies access to the directory.

 

--Glen

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