Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Official PayPal IPN Support Thread


Mark Evans

Recommended Posts

Could someone offer some help please :-)

 

We have a live store on www.lingerie-confidential.co.uk which has been running PayPal IPN version 2.8 for over a year without fault.

 

All of a sudden we have stopped receiveing papypal orders and this can be tracked to a problem with the system when it sends the customer over to the Paypal site.

 

At the point at which the customer selects to pay by Paypal and clicks continue, this takes them to the Paypal site - but nothing more - they are asked to log in on the standard homeapge and are given no order details or anything to pay...

 

Can anyone hazard a suggestion as to why this may be?

 

I have disabled and re-enabled the contribution and re-uploaded the paypal module file to ensure all the correct files are in place however the issue continues...

 

I would appreciate some help!

 

The only other changes made to the store recently are the osCommerce 2.2 Milestone 2 Update 051113 which addressed the security issues in OsC.

 

Thanks

 

Jos

 

I forgot to say - there is a test account to log in with if required

Username : [email protected]

Password : 12345

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

Simple yet Creative

Get Online Web Design : getonlinedesign.com

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

Link to comment
Share on other sites

Did you fix the $0 issue?

 

I had the same problem with GBR then realised I had set my cart to a different code to the paypal ISO code which is GBP - change in the catalogue/includes/languages/english.php file as well as in admin. You also need to check in admin that you have switched to default currency is set to true (admin/configuration/mystore) and that your currency is set to default (admin/localization/currencies). Then it will send to paypal.

 

HTH

Karen

Link to comment
Share on other sites

I am a complete newbie, and having trouble with even getting started. First of all, having read Tdogg's question, I am a bit confused about whether I need this contrib or not. I had seen that people were having lots of orders "disappear," due to the customers' not clicking the "continue" button, and want to prevent that from happening. If there is a simpler way to go about that, I don't want to mess with a whole new module!

 

Second, I'm having a ton of trouble with the installation instructions, basic though they are. The first step says, "Copy the files in the directory structure set in the contribution download file to your osCommerce installation directory."

 

This is a bit vague/cryptic for me, not really being a techie (esp. with php/sql). Am I understanding correctly that this means to copy the entire unzipped results, with files still within their given folders (so they keep the same hierarchy) to the public_html/shop/ directory at my site, which is where OsCommerce is installed?

 

Also, when I unzip the file, all that I get are the following files:

 

install.html

ipn.php

paypal_ipn.php (of which there are two copies, and Windows will only allow one or the other to exist at a time)

changelog.txt

license.txt

 

There are no directories, called "ext" or anything else. If/when I find it (the "ext" directory), what is the catalog root directory? I would have thought that would be public_html/shop/, but I'm thinking that must be the "installation directory" (see above). Is there a directory called catalog someplace? If so, can someone clarify the location?

 

Also, just so that I (hopefully) won't have to bug you again once I do get this installed: When I set up the configuration, does my email address have to be the main email address on my PP account, or can it be any email address listed with that account? If I test with PP's sandbox server, will I actually be charged, or is the purpose of the sandbox server to test *without* actual charges being assessed?

 

Thank you for your patience with a completely clueless newbie. :)

Link to comment
Share on other sites

Another newbie. I have Fast Easy Checkout contribution installed, and I'm trying to get Paypal IPN working. I have installed it, configured to use with sandbox, set up a sandbox account for myself.

I have IPN off, auto return off, payment data transfer off.

In my config, "enable encrypted web payments" is off.

Now, here's my issue. When I checkout I choose paypal, everything works fine until I return to my website. It takes me back to a login screen. If I log in, it puts me at the order page. Everything is still in my cart, however the order shows up in Orders and in paypal as having been placed. Inventory is not being reduced.

Any ideas?

Link to comment
Share on other sites

Hello,

 

I'm having trouble with the PayPal IPN contrib. It could be I don't have things setup properly.

 

I have setup an account at the "sandbox" as instructed. I login. IPN is in testmode with the sandbox account.

 

PayPal IPN

 

Enable PayPal IPN Module

True

 

E-Mail Address

[email protected]

 

Transaction Currency

Only USD

 

Payment Zone

--none--

 

Set Preparing Order Status

Preparing [PayPal IPN]

 

Set PayPal Acknowledged Order Status

Processing

 

Gateway Server

Testing

 

Transaction Type

Per Item

 

Page Style

 

 

Debug E-Mail Address

 

 

Sort order of display.

1

 

Enable Encrypted Web Payments

False

 

Your Private Key

 

 

Your Public Certificate

 

 

PayPals Public Certificate

 

 

Your PayPal Public Certificate ID

 

 

Working Directory

temp/

 

OpenSSL Location

/usr/bin/openssl

 

 

 

I make a test purchase using another account I setup in the sandbox. Everything goes well until I hit the button "Return to Merchant". I am sent to http://checkout_process.php.

 

I have the return URL set in Website Payment Preferences" but its leaving it off.

 

Another question I have is I am nor clear on what the values of "Set Preparing Order Status" and "Set PayPal Acknowledged Order Status" should be.

 

Need help badly!!!

 

Thanks

Link to comment
Share on other sites

Hiya,

 

Ive got a problem with the IPN module all of a sudden and it is asking for the OSC password on the PayPal page when it goes to load my sites logo into the PayPal page.

 

Now after reading some of the other problems here im thinking does this have something to do with PayPal?

 

If not can anyone help with my problem please?

Link to comment
Share on other sites

I am having problems install this

 

I got all the add on to the catalog

and then I go to the payment modules

and I get

 

Fatal error: Cannot redeclare class paypal in /home/ellehost/public_html/mvip/includes/modules/payment/paypal.php on line 20

 

and what that refers to

is

 define('FILENAME_PAYPAL_INFO','popup_paypal.php');
 define('FILENAME_IPN','ipn.php');

**** This is lIne 20****  class paypal {
var $code, $title, $description, $enabled;

// class constructor
function paypal() {
  global $order;**** This is lIne 20****
  $this->code = 'paypal';
  $this->codeTitle = 'PayPal';
  $this->title = MODULE_PAYMENT_PAYPAL_TEXT_TITLE;
  $this->description = MODULE_PAYMENT_PAYPAL_TEXT_DESCRIPTION;
  $this->sort_order = MODULE_PAYMENT_PAYPAL_SORT_ORDER;
  $this->enabled = ((MODULE_PAYMENT_PAYPAL_STATUS == 'True') ? true : false);
  if ((int)MODULE_PAYMENT_PAYPAL_ORDER_STATUS_ID > 0) {
	$this->order_status = MODULE_PAYMENT_PAYPAL_ORDER_STATUS_ID;
  }
  if (is_object($order)) $this->update_status();
  $this->form_paypal_url = 'https://' . MODULE_PAYMENT_PAYPAL_DOMAIN . '/cgi-bin/webscr';
  $this->cc_explain_url = tep_href_link(FILENAME_PAYPAL_INFO, '', 'SSL');
  }

define('FILENAME_PAYPAL_INFO','popup_paypal.php');
 define('FILENAME_IPN','ipn.php');

**** This is lIne 20****   class paypal {
var $code, $title, $description, $enabled;

// class constructor
function paypal() {
  global $order;
  $this->code = 'paypal';
  $this->codeTitle = 'PayPal';
  $this->title = MODULE_PAYMENT_PAYPAL_TEXT_TITLE;
  $this->description = MODULE_PAYMENT_PAYPAL_TEXT_DESCRIPTION;
  $this->sort_order = MODULE_PAYMENT_PAYPAL_SORT_ORDER;
  $this->enabled = ((MODULE_PAYMENT_PAYPAL_STATUS == 'True') ? true : false);
  if ((int)MODULE_PAYMENT_PAYPAL_ORDER_STATUS_ID > 0) {
	$this->order_status = MODULE_PAYMENT_PAYPAL_ORDER_STATUS_ID;
  }
  if (is_object($order)) $this->update_status();
  $this->form_paypal_url = 'https://' . MODULE_PAYMENT_PAYPAL_DOMAIN . '/cgi-bin/webscr';
  $this->cc_explain_url = tep_href_link(FILENAME_PAYPAL_INFO, '', 'SSL');
  }

 

I got a customer that needs to pay andthey can'

t

noppie

Edited by noppie
Link to comment
Share on other sites

I am having problems install this

 

I got all the add on to the catalog

and then I go to the payment modules

and I get

 

Fatal error: Cannot redeclare class paypal in /home/ellehost/public_html/mvip/includes/modules/payment/paypal.php on line 20

 

and what that refers to

is

 define('FILENAME_PAYPAL_INFO','popup_paypal.php');
 define('FILENAME_IPN','ipn.php');

**** This is lIne 20****  class paypal {
var $code, $title, $description, $enabled;

// class constructor
function paypal() {
  global $order;**** This is lIne 20****
  $this->code = 'paypal';
  $this->codeTitle = 'PayPal';
  $this->title = MODULE_PAYMENT_PAYPAL_TEXT_TITLE;
  $this->description = MODULE_PAYMENT_PAYPAL_TEXT_DESCRIPTION;
  $this->sort_order = MODULE_PAYMENT_PAYPAL_SORT_ORDER;
  $this->enabled = ((MODULE_PAYMENT_PAYPAL_STATUS == 'True') ? true : false);
  if ((int)MODULE_PAYMENT_PAYPAL_ORDER_STATUS_ID > 0) {
	$this->order_status = MODULE_PAYMENT_PAYPAL_ORDER_STATUS_ID;
  }
  if (is_object($order)) $this->update_status();
  $this->form_paypal_url = 'https://' . MODULE_PAYMENT_PAYPAL_DOMAIN . '/cgi-bin/webscr';
  $this->cc_explain_url = tep_href_link(FILENAME_PAYPAL_INFO, '', 'SSL');
  }

define('FILENAME_PAYPAL_INFO','popup_paypal.php');
 define('FILENAME_IPN','ipn.php');

**** This is lIne 20****   class paypal {
var $code, $title, $description, $enabled;

// class constructor
function paypal() {
  global $order;
  $this->code = 'paypal';
  $this->codeTitle = 'PayPal';
  $this->title = MODULE_PAYMENT_PAYPAL_TEXT_TITLE;
  $this->description = MODULE_PAYMENT_PAYPAL_TEXT_DESCRIPTION;
  $this->sort_order = MODULE_PAYMENT_PAYPAL_SORT_ORDER;
  $this->enabled = ((MODULE_PAYMENT_PAYPAL_STATUS == 'True') ? true : false);
  if ((int)MODULE_PAYMENT_PAYPAL_ORDER_STATUS_ID > 0) {
	$this->order_status = MODULE_PAYMENT_PAYPAL_ORDER_STATUS_ID;
  }
  if (is_object($order)) $this->update_status();
  $this->form_paypal_url = 'https://' . MODULE_PAYMENT_PAYPAL_DOMAIN . '/cgi-bin/webscr';
  $this->cc_explain_url = tep_href_link(FILENAME_PAYPAL_INFO, '', 'SSL');
  }

 

I got a customer that needs to pay andthey can'

t

noppie

I have had this happen when I tried to keep a copy of the paypal file in the same directory as the new paypal file. I have had to move the orginal file to another directory. I created a directory called paymentbackup and moved the old file there. However your problem looks like you have a repeat of the function in your file. One of the functions need to be commented out.

Link to comment
Share on other sites

 I have had this happen when I tried to keep a copy of the paypal file in the same directory as the new paypal file. I have had to move the orginal file to another directory. I created a directory called paymentbackup and moved the old file there. However your problem looks like you have a repeat of the function in your file. One of the functions need to be commented out.

 

I re added the class files and still get the same thing

then I used a campare files and compared all the files and readded and still the same error.

 

do you have any ideas where that is declaring the funtion?? I out of ideas.

 

Thank you

Link to comment
Share on other sites

I have osCommerce IPN payment installed and I am still testing how it works. I have created a paypalsandbox account with zero balance inorder to test this module. How is the sandbox account used to test Paypal IPN ? what is it supposed to demonstrate?

 

PayPal IPN parameters specified in admin/modules.php?set=payment&module=paypal_ipn

Enable PayPal IPN Module: True

E-Mail Address : sandbox account email address

Transaction Currency: Only USD

Payment Zone: --none--

Set Preparing Order Status: Preparing [PayPal IPN]

Set PayPal Acknowledged Order Status : Processing

Gateway Server: Testing

Transaction Type: Per Item

Page Style: page name as specified in profile of paypal sandbox

Debug E-Mail Address: sandbox account email address

Sort order of display: 0

Enable Encrypted Web Payments: False

Your Private Key:

Your Public Certificate:

PayPals Public Certificate:

Your PayPal Public Certificate ID:

Working Directory: temp/

OpenSSL Location: /usr/bin/openssl

Procedure: I log in as an account holder of the store. select an item and add it to my cart then

shopping_cart.php (continue) checkout_shipping.php (continue) checkout_payment.php (continue)

checkout_confirmation.php (confirm order) takes me to https://www.sandbox.paypal.com/cgi-bin/webscr

in which a paypal checkout page as specified in admin for paypal ipn module comes up

payment says for shopping cart. view cart details has correct cart items.

the bottom of checkout page has Paypal Log in asking for email address and password.

 

what paypal account email and password do I provide it here?

If I am supposed to log in with sandbox account details, paypal goes to next page asking to source funds. The sandbox account has zero funds.

Am I supposed to transfer funds into this sandbox account? if I do so what happens to those funds?

Link to comment
Share on other sites

I have found what I believe to be a MAJOR Bug with this module. The bug allows users to create fake orders by not completing the checkout. I only have two payment modules installed, check/money order, and the official Paypal IPN. Everything works fine if I choose to pay with a check, but if I choose to check out using Paypal, the customer order shows up in the backend admin orders list as soon as I go to the checkout_confirmation.php page. At this point, the customer has not clicked on the confirm order button, but it has already created the order in the database as if they had. So, since we have not hit the confirm button, the customer can potentially click on the cart button and remove the items from their cart and never finish the order. But, now we have an order in our database.

 

Shouldn't the order not actually get saved to the database until the customer clicks on the "Confirm Order" button before they are transferred to the Paypal website.

Link to comment
Share on other sites

I need help getting this module to work. I have set up a paypal sandbox account and have that sandox account email address assigned to official paypal ipn module email.

 

After you confirm order > https://www.sandbox.paypal.com/cgi-bin/webscr shows:

To access the PayPal Sandbox, please log in to PayPal Developer Central.

 

any hints or clues to get this module working with this sandbox account ?

Link to comment
Share on other sites

I need help getting this module to work. I have set up a paypal sandbox account and have that sandox account email address assigned to official paypal ipn module email.

 

After you confirm order > https://www.sandbox.paypal.com/cgi-bin/webscr shows:

To access the PayPal Sandbox, please log in to PayPal Developer Central.

 

any hints or clues to get this module working with this sandbox account ?

 

It's working properly. Just login to your sandbox developer account that first time, then go back and confirm your order again. You just need to get an active session in the sandbox, then after that you can submit orders and it will ask you to login as if you were a normal paypal user submitting a payment.

Link to comment
Share on other sites

It's working properly. Just login to your sandbox developer account that first time, then go back and confirm your order again. You just need to get an active session in the sandbox, then after that you can submit orders and it will ask you to login as if you were a normal paypal user submitting a payment.

Kris, thanks for replying....

 

ok I repeated the process, after you confirm order > "https://www.sandbox.paypal.com/cgi-bin/webscr" > To access the PayPal Sandbox, please log in to PayPal Developer Central > logged in to paypal sandbox > launched a sandbox session > logged in to paypal with sandbox account email > logged out > within the same browser session, I back tracked to confirm order again > confirm order > now it showed the paypal checkout page with correct total and cart contents > log in to your paypal account > supplied a valid paypal account (not the sandbox account) > paypal would not accept login with

Your sign in information is not valid. Please try again.
I tried another valid paypal account , still the same!!!

what paypal account email and password do I provide it here?

Link to comment
Share on other sites

what paypal account email and password do I provide it here?

 

You need to login to the sandbox developer account and create a dummy paypal account, then login with that. It can be the same as your user account on the real PayPal site.

Link to comment
Share on other sites

I have found what I believe to be a MAJOR Bug with this module. The bug allows users to create fake orders by not completing the checkout. I only have two payment modules installed, check/money order, and the official Paypal IPN. Everything works fine if I choose to pay with a check, but if I choose to check out using Paypal, the customer order shows up in the backend admin orders list as soon as I go to the checkout_confirmation.php page. At this point, the customer has not clicked on the confirm order button, but it has already created the order in the database as if they had. So, since we have not hit the confirm button, the customer can potentially click on the cart button and remove the items from their cart and never finish the order. But, now we have an order in our database.

 

Shouldn't the order not actually get saved to the database until the customer clicks on the "Confirm Order" button before they are transferred to the Paypal website.

 

I realize that you are trying to store out the order into the db in case the user never returns to your site, but shouldn't it happen after the use clicks on the confirm button. In other words, the user would click "Confirm Order" and the request would be submitted back to the checkout_confimation.php page, the order would be logged, and the user would then be redirected to the PayPal website.

 

Am I wrong or can someone else confirm what I am seeing and agree that it shouldn't work that way?

Link to comment
Share on other sites

You need to login to the sandbox developer account and create a dummy paypal account, then login with that. It can be the same as your user account on the real PayPal site.

 

I did that Kris. I created a dummy account with the same email address as sandbox account. It has zero balance. It asks how do u fund payment. I gave it a ficticious mastercard number it refused to take it. I gave it a real credit card number , the same as the store credit card, it said :

 

"You cannot email money to yourself. Please enter another user's email address if you would like to send money to someone."

 

If this account is just for testing why do I need to specify financial information? How do i get this thing to work?

Link to comment
Share on other sites

I did that Kris. I created a dummy account with the same email address as sandbox account. It has zero balance. It asks how do u fund payment. I gave it a ficticious mastercard number it refused to take it. I gave it a real credit card number , the same as the store credit card, it said :

 

"You cannot email money to yourself. Please enter another user's email address if you would like to send money to someone."

 

If this account is just for testing why do I need to specify financial information? How do i get this thing to work?

 

Log into the sandbox account, go to adminster accounts, then the dummy account, go to the profile section, then the credit cards section and hit the add a new card button. Ths sandbox will give you a fake Credit card number and info to use.

Link to comment
Share on other sites

I did that Kris. I created a dummy account with the same email address as sandbox account. It has zero balance. It asks how do u fund payment. I gave it a ficticious mastercard number it refused to take it. I gave it a real credit card number , the same as the store credit card, it said :

 

"You cannot email money to yourself. Please enter another user's email address if you would like to send money to someone."

 

If this account is just for testing why do I need to specify financial information? How do i get this thing to work?

 

 

Sounds like you created your sandbox fake paypal account with the same email address that you have set in your paypal ipn module in osc. You can't do that apparently. You need to create an account as if you were some Joe user coming to your site.

 

For example, if your real PayPal email address is [email protected] and that is what you have set your PayPal IPN payment module to use, then when you login as a customer to the sandbox, create an account with an email address like [email protected].

 

I wondered the exact same thing about the CC info. I thought it was pretty stupid, but I guess PayPal is using their real code but just in a testing environment. Therefore you have to put in a valid CC number for it to pass validation.

Link to comment
Share on other sites

My only question is: is there anyway to change the look of the payment area to be more like that of the ipn 2.9 version? (with the credit card logos, and popup info page) I think it is more inviting for people to see that they can use their credit cards, etc. than just looking at the paypal option.

http://www.fda-drug.com/

 

Also is there anyway to getting some of the admin functionality of 2.9 into v1.0? Like the options for store logos, transpher screen color (plus being able to select more than just black or white), etc..

 

I know this is a completly different contrib, done by different people and I am very very gratefull to see that you are continuing with it. I just would like some of the eyecandy, and functions I have gotten used too, and think others would also find useful.

 

again, thank you for the work.

 

RavenWulf

Link to comment
Share on other sites

Hi guys,

 

i just figured out how it can be done to charge the customer with extra fees when he is using paypal_ipn module. because this question has been asked very often here and i have spent many days work in this easy fix, i want to show you how this can be done.

 

but be careful, in some countries this is not allowed by paypal :rolleyes:

 

just go to paypal_ipn.php and search for this line (327 in my file):

 

$parameters['amount'] = number_format(($order->info['total'] - $order->info['shipping_cost'] - $order->info['tax']) * $currencies->get_value($my_currency), $currencies->get_decimal_places($my_currency));

 

after that just add the following line:

 

$parameters['handling'] = number_format(($order->info['total'] * [color=#FF0000]0.042[/color] ) * $currencies->get_value($my_currency), $currencies->get_decimal_places($my_currency));

 

i just take the total value of the whole order and multiply it with 0.042 (what means 4.2%); when passing over the data to paypal, this "handling fee" is added to the "shipping value" by paypal and the customer is charged with this new fee.

 

if you just want to add a certain fee, lets say 5.00 $ then take the following mod, which is even easier:

 

$parameters['handling'] = number_format(5.00 * $currencies->get_value($my_currency), $currencies->get_decimal_places($my_currency));

 

i think with this easy mod i can make lots of people happy :thumbsup:

Link to comment
Share on other sites

I am not too sure why I have not heard back from anyone. If it is because it seems like I am being lazy and should have searched the forums and documentation first, it is not.

 

I spent a few days going through the forums, and reading over the install readme file for this contribution.

 

I am looking at this contribution and the PayPal_Shopping_Cart_IPN

 

I am trying to figure out the difference between these two contributions and the original PayPal set up that comes with the OSC install.

 

Can someone tell me the differences or where online I can read more about them?

 

Thanks so much everyone.

 

Eric B

 

I think the difference is that with the original PayPal, when a user goes through PayPal, they have to click a button to go back to the store. If they don't click the button, the transaction doesn't finish through osCommerce so you don't know what they bought. The PayPal contribution stores their shopping cart data and marks the order as 'Preparing - PayPal IPN'. When they go through Pay Pal and if they hit that 'back' button to return to your site, the status of the order is changed to 'Pending' or whatever you set your orders to. If not, it remains at 'Preparing'. Either way, you have the information about what they ordered. It's a great contribution because many customers fail to return to the store and their order info (except payment) gets lost. Keeps you from having to contact them about what they bought.

 

Hope that helps.

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