Jump to content
benny4563

paypal advanced paypal payflow

Recommended Posts

I have installed everything correctly for PayPal Advanced except I get this error when I try to pay for the cart:

 

 

Some required information is missing or incorrect. Please correct the fields below and try again.

  • Error: Invalid Merchant or Merchant doesn't exist!

I know the merchant exists and the tech people at paypal don't have a problem and do not get the error. Any body have this problem?

Share this post


Link to post
Share on other sites

I did see that error before, but I can't remember what solved the problem.

 

I think it may have been when I was trying to test everything through the PayPal Sandbox...I never could get that to work properly. PayPal support people even said nothing was wrong with how I had the Sandbox account set-up, but they could not get it to work either. They finally admitted that their Sandbox is problematic, and suggested I switch everything to "Live". After switching to "Live" everything worked perfectly.

 

Again, I'm not sure if this was when I saw that error, so this is purely a guess.

Share this post


Link to post
Share on other sites

Ben, were you ever able to solve this problem? I am receiving the exact same error message (Error: Invalid Merchant or Merchant doesn't exist!) when I attempt to check out with certain items in my cart.

 

Strangely, I only receive this error message when both of the following two conditions are met:

i) I have one of the two most expensive items that I sell on my site in the shopping cart, and

ii) The transaction is subject to sales tax.

 

If these two conditions are not met, the checkout process is completed perfectly w/ no issues from PayPal. I am using osC v2.3.3, PayPal Payments Advanced (Layout C), and PayPal Payflow as my payments module. When I spoke w/ a PayPal Integration representative, he said my site was not receiving a secure token from PayPal in the cases when I receive this error message, so something about two items I sell combined with sales tax being charged is causing a problem with the secure token being sent and received from PayPal.

 

I am of course happy to provide any additional information as needed. Thanks very much to anyone who can help me, and thanks to all the smart/helpful people on this forum who have allowed me to get this far!

Edited by Dano87

Share this post


Link to post
Share on other sites

I have encountered this same problem, I am using Paypal's Layout C. I fixed the issue by going to Admin > Configuration > My Store and changed the "Display Prices with Tax" to true. When set to true the problem resolved, when set to false the error message displays.

Share this post


Link to post
Share on other sites

I first encountered the first error, but I changed to Live from Sandbox. I'm currently getting this error now so please let me know how I can go to resolve this issue.

 

I have encountered an error below even I changed Admin > Configuration > My Store and it is currently displayed as false.

 

Some required information is missing or incorrect. Please correct the fields below and try again.

  • Error: Token is missing. Please return to the website from where you started your purchase and try again.

Thanks,

Share this post


Link to post
Share on other sites

I changed Admin > Configuration > My Store and changed the "Display Prices with Tax" to true, but I still get the same error.

 

Some required information is missing or incorrect. Please correct the fields below and try again.

  • Error: Token is missing. Please return to the website from where you started your purchase and try again.

Please help me out if you have any idea how to resolve this issue.

 

Thanks,

 

Tom

Share this post


Link to post
Share on other sites

I solved the "Error: Invalid Merchant or Merchant doesn't exist!" problem in the weirdest way you can imagine. All I did was move the info box from the right side of the page back to its default place on the left side!

 

In the middle of March I installed two OSCommerce 2.3.3 stores and got them both working with PayPal Payflow -- I have the new "Advanced" account. I even put through several small transactions on my own credit card to make sure everything was working.

 

After that, I continued to make changes in the store appearance, and in the process PayPal Payflow stopped working in one of them.

 

I spent at least 12 hours trying to solve the problem. I restored the files that I had changed. I spent about 3 hours on the phone with the PayPal tech staff, convinced that the problem must be on their end. I even tried installing a new user on the manager.paypal side. They were convinced that the problem must be on my end, and I only half believed them.

 

Since one of my stores was working and the other wasn't, I decided to make everything in the non-working store identical to the one that was working. So I downloaded all of the oscommerce-2.3.3 files (except the configuration files) from the store that was working and uploaded them to the store that wasn't working. But it still didn't work.

 

So I kept looking for any difference, any difference whatsoever, between the two stores. And the only difference that I could find was that I had moved the info box in the non-working store from its default place on the left side of the page to the right side of the page. So I moved the info box back to the left side and, voila, it worked!

 

I am about 90% sure that this was the solution, but I am not positive, and I am not going to check by putting the info box back on the right! Now that it's working, I'm not planning to change anything!

 

Howard

Edited by HowardR

Share this post


Link to post
Share on other sites

Whoops! I was wrong. The location of the info box was not the problem. The problem depends upon which products are in the cart. It only seemed to work after I moved the info box back from the right to the left because at the same time I changed the product that I was using in my test of the store.

 

DanO87 was on the right track when he wrote that this error depends upon which items are in the cart:

 

SBen, were you ever able to solve this problem? I am receiving the exact same error message (Error: Invalid Merchant or Merchant doesn't exist!) when I attempt to check out with certain items in my cart.

 

Strangely, I only receive this error message when both of the following two conditions are met:

i) I have one of the two most expensive items that I sell on my site in the shopping cart, and

ii) The transaction is subject to sales tax.

 

If these two conditions are not met, the checkout process is completed perfectly w/ no issues from PayPal. I am using osC v2.3.3, PayPal Payments Advanced (Layout C), and PayPal Payflow as my payments module. When I spoke w/ a PayPal Integration representative, he said my site was not receiving a secure token from PayPal in the cases when I receive this error message, so something about two items I sell combined with sales tax being charged is causing a problem with the secure token being sent and received from PayPal.

 

I have isolated the problem to the fact that PayPal doesn't return the securetokenID in a form usable by catalog/checkout_confirmation.php when checkout_confirmation.php?osCsid=... is called by catalog/checkout_payment.php.

 

My next attempt will be to solve the problem by going back to the checkout_payment.php and the checkout_confirmation.php of v2.3.1.

Share this post


Link to post
Share on other sites

Oh well, uploading checkout_payment.php from v2.3.1 didn't help and I was already using the version of checkout_confirmation.php supplied by PayPal. I am getting this error message with some products but not others. I can't see a pattern, other than that all of the products that don't work are taxable ones.

Share this post


Link to post
Share on other sites

@@HowardR

 

You should NOT see the OSCID= in the URL. If you do, that means you have a session error which might be preventing you from checking out.

 

 

 

Chris


:|: Was this post helpful ? Click the LIKE THIS button :|:

 

See my Profile to learn more about add ons, templates, support plans and custom coding (click here)

Share this post


Link to post
Share on other sites

Thank you, Danielle. Your solution worked for me. In Admin > Configuration > My Store I changed the "Display Prices with Tax" to true. It's weird to have prices displayed with sales tax, but it works.

Share this post


Link to post
Share on other sites

@@DunWeb,

 

Sorry for not being clear. I was looking at the html source code of running php files, as generated by my browser when doing the checkout process. I was comparing code when the process would work correctly with the process when it would not.

 

I meant to say that found no significant differences in the file checkout_payment.php, other than that the value of the osCsid was different in statements such as:

 

<form name="checkout_payment" action = "... checkout_confirmation?osCsid=gjl....">

 

and

 

checkout_payment_address.php?osCsid=gjl...

 

But I did find a significant difference in the html source code of checkout_confirmation.php, namely that the good version had a value for securetokenID and the bad one did not.

 

I suspect that the problem is with the getToken function in catalog/includes/modules/payment/paypal_payflow_link.php, furnished by PayPal. But I haven't taken the time to examine the values for $key and for $value when the function is working and when it is not working. I would look for either an "=" or an "&" in a $key or in the $value. Such a character could throw everything off since keys and values are paired using the equal sign and separated from each other using the ampersand, i.e.:

 

$apiStr .= $key . '=' . $value . '&';

 

I'm not sure whether I will take the time to explore this further. If my store works ok with sales tax included, I may just let it be.

 

Howard

Share this post


Link to post
Share on other sites

I found the PayPal Payflow bug!

 

The payflow module provided by PayPal (catalog/includes/modules/payment/paypal_payflow_link.php) gives an " Error: Invalid Merchant or Merchant doesn't exist!" when you are using PayPal Advanced with OS Commerce v2.3.3.

 

Instead of a PayPal IFrame comming up in catalog/checkout_confirmation.php, you get an error message. The problem occurs in the pre_confirmation_check() function in the paypal_payflow_link.php file whenever the amount of the transaction has more than 2 decimal places.

 

In other words, the PayPal IFrame comes up in catalog/checkout_confirmation.php if

 

AMT=7.08

 

But instead you get "Error: Invalid Merchant or Merchant doesn't exist" if

 

AMT=7.0876

 

To fix the bug a few lines of code need to be inserted into the file catalog/includes/modules/payment/paypal_payflow_link.php so as to round the amount to the nearest penny.

 

I'll post my solution code here, once I write it unless someone else posts one first.

 

Howard

Share this post


Link to post
Share on other sites

Here's my fix:

 

In the file catalog/includes/modules/payment/paypal_payflow_link.php replace line 86, which currently reads:

 

. "&AMT=" . $order->info['total']

 

so that it reads:

 

. "&AMT=" . tep_round($order->info['total'], '2')

 

Howard

Share this post


Link to post
Share on other sites

Here's what I think happened: In the update from v2.3.1 to v2.3.3, a rounding error was fixed by storing the amount of a transaction with 4 decimal places, instead of just 2. Meanwhile, when PayPal code read that amount, it failed whenever the amount had more than 2 decimal places.

 

The fix is simple, you just need to change one line of code in order to round the amount of the transaction, as supplied to PayPal, to two decimal places. I have notified PayPal Support about the bug and its fix. Once they update their code at x.com, PayPal Advanced should work equally well with versions 2.3.1 and 2.3.3. In the meantime, if you plan to use PayPal Advanced you can either install 2.3.1 or you can install 2.3.3 and fix the one line of code yourself.

 

Howard

Share this post


Link to post
Share on other sites

What are you doing for customers who cancel at the PayPal site? That is - they choose to pay via paypal so they punch out to the PayPal site, but there they choose to "Cancel and return to store page"...

 

If you do not configure payflow for a page, it doesn't return them to the store... if you configure it for checkout_success.php, obviously the order appears to go through...

 

I've configured my return url to https://www.<site>.com/store/checkout_payment.php - and this is working okay, but would love to hear what others are doing.

Share this post


Link to post
Share on other sites

I need to install PayPal Advanced and I have tried to watch that video but half of the audio part is missing.

 

I'm wondering if there's a transcript of that video somewhere?

 

Thanks,

 

Ed

Share this post


Link to post
Share on other sites

I'm struggling with the Paypal Advanced/Payflow module. I've picked up all these changes and thought I had everything up and working on my test server. But I've run into 2 issues.

 

The first is that I have everything set as "Test" server and sandbox, but it won't accept any test credit cards and when I put in a real card, it actually charges it! This has made my second and more serious problem harder to diagnose.

 

The second problem is that on the local server, it appears to work fine. Payment processed, order shows up in the admin, and I get taken to the checkout_success page. When I put it live on my server (and update the manager.paypal), it instead shows the login page in the iframe, the payment gets sent to PayPal, but nothing shows up in the admin, so the order cannot be tracked or logged in. I feel like I must have missed something obvious, but I can't figure it out. And with it sending all orders as real orders, it is a pain because I have to refund everything.

 

Any ideas?

 

Thanks,

Kristin

Edited by ksmaltz

Share this post


Link to post
Share on other sites

@@ksmaltz

 

The second problem is that on the local server, it appears to work fine. Payment processed, order shows up in the admin, and I get taken to the checkout_success page. When I put it live on my server (and update the manager.paypal), it instead shows the login page in the iframe, the payment gets sent to PayPal, but nothing shows up in the admin, so the order cannot be tracked or logged in. I feel like I must have missed something obvious, but I can't figure it out. And with it sending all orders as real orders, it is a pain because I have to refund everything.

 

 

 

I am having the same issue... I have set this up on 2 other websites without any problems. Now all of the sudden this iFrame loop thing. I have called paypal and they told me to reinstall but it didn't help. Any ideas would be appreciated.

Share this post


Link to post
Share on other sites

I now believe this to be a php.ini issue. I uploaded my php.ini file from my other sites and it crashed my new site - 500 Internal Server Error

 

register_globals = on

 

extension=mysql.so

 

my host is powweb - not sure if that is relavant...

Share this post


Link to post
Share on other sites

okay - apparently this particular host (powweb) will not allow me to edit the php.ini file.

 

i had to call in and ask for the following changes "Turn on register_globals and enable the MySQL extension" - they will be resetting the server shortly & I will place a test order and repost if that did the trick.

Share this post


Link to post
Share on other sites

Thanks that was a HUGE help in setting up payflow!!

I have it up and working now- only one last difficulty- it is sending the state in long form (ie.. Georgia) instead of short form (ie GA) which messes up things a bit- anyone know where that is happening?

Thanks

 

 

 

 

I found the PayPal Payflow bug!

 

The payflow module provided by PayPal (catalog/includes/modules/payment/paypal_payflow_link.php) gives an " Error: Invalid Merchant or Merchant doesn't exist!" when you are using PayPal Advanced with OS Commerce v2.3.3.

 

Instead of a PayPal IFrame comming up in catalog/checkout_confirmation.php, you get an error message. The problem occurs in the pre_confirmation_check() function in the paypal_payflow_link.php file whenever the amount of the transaction has more than 2 decimal places.

 

In other words, the PayPal IFrame comes up in catalog/checkout_confirmation.php if

 

AMT=7.08

 

But instead you get "Error: Invalid Merchant or Merchant doesn't exist" if

 

AMT=7.0876

 

To fix the bug a few lines of code need to be inserted into the file catalog/includes/modules/payment/paypal_payflow_link.php so as to round the amount to the nearest penny.

 

I'll post my solution code here, once I write it unless someone else posts one first.

 

Howard

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×