Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

PayPal Express Checkout IPN Payment Module


AlexStudio

Recommended Posts

Thanks,

I will try that and let you know how I make out.

 

Coffeeman

 

BTW,

This might be a stupid question, but just so I am clear on this, if I use the WPP+EC v0.8.2, with the PWA feature built-in, the page presented when a customer hits the store checkout button in shopping cart will be my old checkout screen plus a new button for express checkout? Will I be able to hide the code that asks customer to create an account or login? or will doing so affect the paypal code? I will obviously need to alter my google checkout code insertion since google checkout currently appears on the shopping cart page once an item is added to the cart. Can I do the same with the express pay button so I don't have display a store checkout button? This would be convenient since it eliminates a step from the checkout process. Remember, I don't want to customer to enter any personal info through my store.

:blink:

Thanks

Link to comment
Share on other sites

  • Replies 405
  • Created
  • Last Reply

Top Posters In This Topic

BTW,

This might be a stupid question, but just so I am clear on this, if I use the WPP+EC v0.8.2, with the PWA feature built-in, the page presented when a customer hits the store checkout button in shopping cart will be my old checkout screen plus a new button for express checkout? Will I be able to hide the code that asks customer to create an account or login? or will doing so affect the paypal code? I will obviously need to alter my google checkout code insertion since google checkout currently appears on the shopping cart page once an item is added to the cart. Can I do the same with the express pay button so I don't have display a store checkout button? This would be convenient since it eliminates a step from the checkout process. Remember, I don't want to customer to enter any personal info through my store.

:blink:

Thanks

Please check with the WPP+EC v0.8.2 package. Screen shots are included. Showing the express checkout button with the google checkout in the same page is not allowed by PayPal. Please visit PayPal website and read the express checkout integration guide before you go any further. If you still want to do that, you are on your own.

Super Download Shop, PayPal Express Checkout IPN, Selling Downloads, Visual Validation (preventing robotic flood), phpBB2 Integration

 

Yes, I'm willing to help, but please ask in the right place. Think twice before trying to PM me, it might be ignored.

Link to comment
Share on other sites

Whilst testing though, i've noticed that while the website account address and paypal address match, the transaction did not go through. An error like "address mismatch occured" in a pink box appears on the screen.

Please check your database address_book table and see if you have any NULL entries in either entry_suburb or entry_state field.

 

I have a db_address_book.php script ready, it is an utility to prepare your databse address_book records to work with EC IPN module. Before releasing it, I need to know if it is the case which caused your address matching failed. Please report what you find out. Thanks.

Edited by AlexStudio

Super Download Shop, PayPal Express Checkout IPN, Selling Downloads, Visual Validation (preventing robotic flood), phpBB2 Integration

 

Yes, I'm willing to help, but please ask in the right place. Think twice before trying to PM me, it might be ignored.

Link to comment
Share on other sites

Hey Alex!

 

With your new version it works perfectely now in our shop!

 

One question remains...isn't it possible to include the company logo at the paypal site?

 

Thanks a lot for all your help!

Andreas

Set up your PayPal Payment Page Style in your PayPal account profile. You can put your logo in a banner at the page heading.

Super Download Shop, PayPal Express Checkout IPN, Selling Downloads, Visual Validation (preventing robotic flood), phpBB2 Integration

 

Yes, I'm willing to help, but please ask in the right place. Think twice before trying to PM me, it might be ignored.

Link to comment
Share on other sites

I've got a newbie question here. Sorry if I missed it some where in the thread, but I can't seem to figure out how to get past the paypal API installation. I'm running Apache with PHP, I have my SSL cert installed and everything else seems to be working; when I run the eg_diagnostics.php app it says that the API is not installed. What do I have to do to install PayPal's API that I requested and downloaded?

Link to comment
Share on other sites

when I run the eg_diagnostics.php app it says that the API is not installed.

That means the API cert file couldn't be found. You need to set the FULL FILE PATH to its filename. It's case sensitive if you're hosting on linux.

Super Download Shop, PayPal Express Checkout IPN, Selling Downloads, Visual Validation (preventing robotic flood), phpBB2 Integration

 

Yes, I'm willing to help, but please ask in the right place. Think twice before trying to PM me, it might be ignored.

Link to comment
Share on other sites

  • 2 weeks later...

I have installed you contribution and so far so good. Can't say much for the Sandbox though - it had me going round and round in circles trying to verify my account. Down here in Aussie land, our Paypal representative has asked that we put the big yellow Paypal button on our shopping cart page instead of a new checkout shipping page. Would this be hard to do or just impossible - what would the implications be? Could the code be put in a module that is processed when the button is submitted?

 

Any help would be extemely welcome!!!!

Link to comment
Share on other sites

In the WPP+EC module v0.8.2 which this contrbution based on, the big yellow button is on the shopping cart page.

 

The button was added to checkout shipping page in v0.2 of this contribution, instead of the shopping cart page, because the shopping cart page could be skipped if the customers click on the checkout link on the nav bar. It is not difficult to put that button in the shopping cart page, I didn't include that because I don't think it's necessary, and I want to keep it as simple as possible.

 

As stated in the TOS of PayPal EC API document, the placement of the EC button should be on the first step of checkout, and not to be displayed with any other payment methods. I believe this contribution followed that TOS and no need to move the button to shopping cart page.

Edited by AlexStudio

Super Download Shop, PayPal Express Checkout IPN, Selling Downloads, Visual Validation (preventing robotic flood), phpBB2 Integration

 

Yes, I'm willing to help, but please ask in the right place. Think twice before trying to PM me, it might be ignored.

Link to comment
Share on other sites

In the WPP+EC module v0.8.2 which this contrbution based on, the big yellow button is on the shopping cart page.

 

The button was added to checkout shipping page in v0.2 of this contribution, instead of the shopping cart page, because the shopping cart page could be skipped if the customers click on the checkout link on the nav bar. It is not difficult to put that button in the shopping cart page, I didn't include that because I don't think it's necessary, and I want to keep it as simple as possible.

 

As stated in the TOS of PayPal EC API document, the placement of the EC button should be on the first step of checkout, and not to be displayed with any other payment methods. I believe this contribution followed that TOS and no need to move the button to shopping cart page.

I understand that was what was required but Melita and Spiro from Paypal in Australia have asked in our contract that it be put on the shopping cart. I tried to move your coding and made a huge mess and thought it would be easier if I just asked for a little help. I am not proficient with php coding.

 

So the good news is you say it can be done :-) What would you suggest is the best way I go about moving it?

Link to comment
Share on other sites

Hi everybody.

 

 

I have set up this contribution and seems to work.

 

However I have also a copy of zen-cart installed and they have an almost identical contribution except that the customer does not have to be a PayPal member.

 

Can this be done for this contribution. It would be great if possible.

 

Best Regards,

Tom.

Link to comment
Share on other sites

So the good news is you say it can be done :-) What would you suggest is the best way I go about moving it?

The easiest way to achieve this is to add one line in ec_shipping.php:

 

Find in ec_shipping.php around line 191:

  require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_CHECKOUT_SHIPPING);

Add before:

  if (isset($HTTP_GET_VARS['ec_button']) && $HTTP_GET_VARS['ec_button'] == 1) tep_redirect(tep_href_link(FILENAME_EXPRESS_CHECKOUT, 'action=express', 'SSL'));

 

Then in shopping_cart.php where you added the button, use tep_href_link(FILENAME_EXPRESS_CHECKOUT_SHIPPING, 'ec_button=1', 'SSL') for the button code.

Super Download Shop, PayPal Express Checkout IPN, Selling Downloads, Visual Validation (preventing robotic flood), phpBB2 Integration

 

Yes, I'm willing to help, but please ask in the right place. Think twice before trying to PM me, it might be ignored.

Link to comment
Share on other sites

However I have also a copy of zen-cart installed and they have an almost identical contribution except that the customer does not have to be a PayPal member.

Can this be done for this contribution. It would be great if possible.

Customers do not need to have a PayPal account prior to pay with this contribution, only that PayPal requires payers to sign-up an acount when paying with Express Checkout API if they don't have one, no matter what cart you're using.

 

The 'PayPal Account Optional' feature is not supported with Express Checkout API, it's the PayPal's policy, not the problem of this contribution.

Super Download Shop, PayPal Express Checkout IPN, Selling Downloads, Visual Validation (preventing robotic flood), phpBB2 Integration

 

Yes, I'm willing to help, but please ask in the right place. Think twice before trying to PM me, it might be ignored.

Link to comment
Share on other sites

The easiest way to achieve this is to add one line in ec_shipping.php:

 

Find in ec_shipping.php around line 191:

  require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_CHECKOUT_SHIPPING);

Add before:

  if (isset($HTTP_GET_VARS['ec_button']) && $HTTP_GET_VARS['ec_button'] == 1) tep_redirect(tep_href_link(FILENAME_EXPRESS_CHECKOUT, 'action=express', 'SSL'));

 

Then in shopping_cart.php where you added the button, use tep_href_link(FILENAME_EXPRESS_CHECKOUT_SHIPPING, 'ec_button=1', 'SSL') for the button code.

You make it sound sooooo easy - I will go and try this and let you know how I go! Thanks in advance :thumbsup:

Link to comment
Share on other sites

You make it sound sooooo easy - I will go and try this and let you know how I go! Thanks in advance :thumbsup:

Worked like a charm! Are you good or what????? :lol:

Link to comment
Share on other sites

PayPal Express Checkout IPN v0.4.1 update released.
  • Bug Fixed - In v0.4 if more than 1 record found in address book matched the street address sent back by PayPal, a new address record would be added because the address matching code couldn't tell which record it should be. Re-wrote the address checking code to pick an address from matched records and not to create any new entry.
  • Bug Fixed - In v0.4 if EC button disabled, the error message for the cancel url couldn't be shown when shipping is skipped (virtual orders). Changed the cancel url to checkout payment page when order content type is virtual and EC button not enabled.
  • Added a new configuration key to skip sending shipping address to paypal.
  • Added a new configuration key to skip the confirmation page before sending customers to PayPal.
  • Minor bug fixed in the language level file, the cURL not exiting error message was not modified from WPP module, now amendeded to EC IPN module.
  • Added in ipn.php to handle the customer's selected language to be used with order comments (IPN message logging).
  • Modified in ipn.php not to show address status if shipping address not present (skipped or virtual orders).
  • Bug fixed in ipn.php to work around osCommerce rounding issue with different decimal points settings.
  • Bug fixed in ipn.php to handle all possible cancelled order statuses.

 

Dear Mr. Alex,

 

We are getting "PayPal EC IPN Error" emails with "Toatl amount did not match" for most of the payments even though the amounts are the same after installing this new version. Please help.

 

Thanks,

 

Lakshmanan S.

Edited by celextel
Link to comment
Share on other sites

We are getting "PayPal EC IPN Error" emails with "Toatl amount did not match" for most of the payments even though the amounts are the same after installing this new version. Please help.

In the v0.4.1 ext/modules/payment/paypal_ec/ipn.php line 140:

	  $discrepancy = 2;

Adjust the value from 2 up to 50.

 

This is caused by osCommerce rounding problem. Apparently The new code in v0.4.1 is not good enough to get rid of the problem when you have a large currency exchange rate value. I will dig further into it when I have time.

Edited by AlexStudio

Super Download Shop, PayPal Express Checkout IPN, Selling Downloads, Visual Validation (preventing robotic flood), phpBB2 Integration

 

Yes, I'm willing to help, but please ask in the right place. Think twice before trying to PM me, it might be ignored.

Link to comment
Share on other sites

Ok, I have another (probably dumb) question:

 

I have got the contribution in fine and am now trying to start testing - but, the Sandbox user I have set up is not verified. It has a bank account and a credit card set up but as I don't get the dummy letter from paypal with some security code written on it - I cannot verify. My contact at Paypal verified our test business account no problems for me but I obviously cannot use this as I cant pay for something from my own account with my own account!

 

I have asked our contact to verifiy this new customer account so I can test and he tells me he cannot and I dont need it - he says => Actually, just noticed the error returned. I cant verify a personal account. You really should be able to process payments without this step. Just on this point: the funding source is always transparent to you. The way PayPal approves funds for transfer goes through a number of filters and will not be apparent or made available to you through the API's or Web interface. So just having a CC attached to your personal test account is sufficient to test your integration.Cheers,Spiro.

 

My problem is I get no further than this error message:

We're sorry, but we were unable to process your payment.

To maintain a high level of security, only customers with a verified PayPal account are allowed to access Express Checkout. Please either verify your account at PayPal or select an alternate payment method.

 

So, do I need to be verified or not or am I doing something wrong.

 

Again - any help is greatly appreciated as I don't personally use Paypal and don't know that much about it.

:'(

Link to comment
Share on other sites

Set Accept Verified Accounts Only? to No.

Super Download Shop, PayPal Express Checkout IPN, Selling Downloads, Visual Validation (preventing robotic flood), phpBB2 Integration

 

Yes, I'm willing to help, but please ask in the right place. Think twice before trying to PM me, it might be ignored.

Link to comment
Share on other sites

Set Accept Verified Accounts Only? to No.

Gee that was obvious - yet I was still blind enough to miss it - thank you.

 

Next question while you are around - If I want to delay capture the funds - can this contribution handle that? For example, I want to accept an authorisation only and later, after we have checked the customers details and stock levels, then we want to capture the funds. We have this system working now with our VeriSign gateway and it works like a charm. So I read up on this and it all looks like paypal can handle it but I need different IPN messages?????? Or is it something else very simple I missed??

 

Thanking you once again in advance! :rolleyes:

Link to comment
Share on other sites

No. The autorize and capture feature in Express Checkout API is not implemented in this module.

Super Download Shop, PayPal Express Checkout IPN, Selling Downloads, Visual Validation (preventing robotic flood), phpBB2 Integration

 

Yes, I'm willing to help, but please ask in the right place. Think twice before trying to PM me, it might be ignored.

Link to comment
Share on other sites

Ok, I have another question - yes probably very stupid - and probably giving away my poor php coding skills but:

 

I seem to be falling through into wrong sections of code whenever I hit this code:

  $paypal_ec->update_status();
 $ec_enabled = (($paypal_ec->enabled)? 1 : 0);

It seems to remove or change the status from 1 to blank so when the next if statement asks if $ec_enabled !=1 it is always true. this causes me to keep displaying the checkout_shipping.php.

 

How does this update_status() work and is it supposed to be setting the $ec_enabled field to ' '???

 

Appreciate your help.

:'(

Link to comment
Share on other sites

The first line of the code is running the update_status() function, which check if EC IPN module is enabled in admin. When the result is true, it sets $paypal_ec->enabled to true, otherwise sets it to false.

 

The second line is the same as below code:

if ($paypal_ec->enabled) $ec_enabled = 1;
else $ec_enabled = 0;

Edited by AlexStudio

Super Download Shop, PayPal Express Checkout IPN, Selling Downloads, Visual Validation (preventing robotic flood), phpBB2 Integration

 

Yes, I'm willing to help, but please ask in the right place. Think twice before trying to PM me, it might be ignored.

Link to comment
Share on other sites

This is caused by osCommerce rounding problem. Apparently The new code in v0.4.1 is not good enough to get rid of the problem when you have a large currency exchange rate value.

 

Actually, I ran into the same problem with the WPP module. I fixed it in 0.9 by replacing all instances of tep_round() with simply round(), and the problem went away.

Please use the forums for support! I am happy to help you here, but I am unable to offer free technical support over instant messenger or e-mail.

Link to comment
Share on other sites

Than you Brian. I replaced all tep_round() with round() since v0.1. But in the IPN code, the rounding problem is more complicated. Currently with the descrepancy adjusting code in ipn.php, the problem only occurs on large exchange rate value.

Super Download Shop, PayPal Express Checkout IPN, Selling Downloads, Visual Validation (preventing robotic flood), phpBB2 Integration

 

Yes, I'm willing to help, but please ask in the right place. Think twice before trying to PM me, it might be ignored.

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