Paypal validation failsSolved

Hi I have tried Paypal but I can't seem to get it working. The payment goes through successfully, however when you click on the return link in paypal, you return to the "pay_thankyou.aspx" page and thats it.

Should not Paypal automatically return to the appropriate page when the payment has gone through. Is there a step missing?

The return paypal validation fails at the first hurdle. This is in sandbox mode

If (Request.Form.Item("payment_status") <> "Completed") Then errorlog.WriteActivity("PP Payment status not completed successfully") Return False End

Another thing: I logged on to LimeLM this morning and got about dozen activation keys (none activated). They must have beeb made at various points yesterday, but why did they showup only today. They are all associated with the customer email, but there is nothing in the customer email inbox. Strange

"Should not Paypal automatically return to the appropriate page when the payment has gone through. Is there a step missing?"

OK disregard this - return activity is generated as soon as you press Pay Now. Its jsut that the validation fails

Add a breakpoint at every "Return" statement in paychecker.aspx.vb. This way you can validate what went wrong.

... but there is nothing in the customer email inbox. Strange

The email sending code is in PaymentSetting.vb. There's a comment that explains how to set up ASP.NET to send emails:

System.Net.Mail reads SMTP configuration data out of the standard .NET configuration system(so for ASP.NET applications youd configure this in your applications web.config file).

Here is an example of how to configure it:

<system.net>  <mailSettings>    <smtp from="test@foo.com">      <network host="smtpserver1" port="25"               userName="username" password="secret" defaultCredentials="true" />    </smtp>  </mailSettings></system.net>

Hi

I have done some more trials, but the validation seems to still fail at this point:

If (Request.Form.Item("payment_status") <> "Completed") Then errorlog.WriteActivity("PP Payment not completed successfully") Return False End If

I tried it in non-sandbox mode (with a nominal payment) and paypal sends out two email notifications - to the customer and to the company.

Turbo Activate works, so the licence key can be issued manually I suppose. Find-Key by email also works.

What is the "payment_status" when it fails? Write that to your log:

errorlog.WriteActivity("PP Payment not completed successfully" & Request.Form.Item("payment_status"))

Returned Status = Pending

It should eventually contact your server with the "Completed" status. Does this ever happen? That is, are you letting your server run for a while or are you killing it immediately after it gets a "Pending" status?

its on a remote server (VPS) so its always running in the background. But yes there is something holding up the process

I've sent you an email with a new version of paychecker.aspx.vb. Try that.

it still has the same status = "pending" issue

' PayPal returns "VERIFIED" if it's a valid order

this bit is true, it it helps. Should have also have included in previous post

A response of "VERIFIED" does not mean that PayPal has accepted the payment. It just means that whatever was posted to "paychecker.aspx" was indeed sent from PayPal (and not from some user trying to get a free license). For instance PayPal could be sending you a notification that the payment was rejected and it would still be "VERIFIED".

In other words, there's something wrong with your PayPal sandbox that everything is getting posted as Pending rather than Completed. I'd talk to PayPal about this.

Hi

I think the payment status="pending" issue is currency related. If I accept payments in USD instead of GBP (i.e. do not use Paypal currency conversion, let the credit card company do it), then the payment status="Complete". I tried this in non-sandbox mode and it works. In sandbox mode I also created a USD user, but it doesn't work for some reason. Who knows

A problem now appearing is that 1 paypal payment is generating multiple keys ( 8 keys over the space of 1 hr!). Currently the Paypal API looks to be too buggy to be honest

Its a pity because Paypal collects UK VAT which is very useful. I can use it in the meantime but without the API

as of now its generated 11 keys please help!

It looks like product keys are being generated correctly. The "Pending" failures from earlier are now being completed by PayPal -- they're just being slow about it. Here's what I would recommend:

  1. Delete the generated product keys.
  2. Cancel any pending payments in PayPal and the sandbox.
  3. Revert the paychecker.aspx.vb file to the one included in the Web API Pack.

Then run a single sandbox payment with the currency & price set to what you want. Set the quantity to something you haven't used before so you can tell that this is a new test. Then wait for it to be completed.

Does this make sense?

well we get status quo ante, with a GBP test user and a USD price

If I can quote from the log entry:

Log Entry : 08/16/2011 00:00:05http://www.hallion-systems.com/buy/paychecker.aspx?paypal=1PP Payment Status <> Completed. Returned Status = Pending; Payer email: paypal_1313448057_per@hallion-systems.com; Quantity: 6__________________________

Log Entry : 08/16/2011 00:00:05http://www.hallion-systems.com/buy/paychecker.aspx?paypal=1PP validation failed

Yes, a "Pending" response is a failure. Wait to see if PayPal eventually sends a "Completed" response.

This has been fixed since the web API pack version 2.0.1: https://wyday.com/limelm/api/webapi-changes/