Customer Charged - License Not Sendt (mail send failed)Solved

Hello,

First: I got all working now. But I think the problem I uncovered should be handled by LimeLM.Setting up Basic TurboActive was a breeze, and worked the first time around! 😎

I have set up Payment using PayPal but Choose to Pay with Credit Card when PayPal gives me the option:See the following link: https://objective.no/vcasde10_Buy/payment.aspx(Hosted on Winhost in the US)

In the beginning, sending mail from the WinHost Web Server failed.This caused the following things to happen:

a) The credit card was charged, and PayPal sent a Message to the Customer and the Seller. Charging the Credit card in this case is a bit worrying.

b) LimeLM kept retrying, and each time Generated a NEW License Key 12 times.

This immediately exhausted my Free Trial.I upgraded to Solo, but Live Testing has after a few tests exhausted 79 License Keys.As I said, when email setting now is working, all is well. But there is a potential "bomb" if for some reason the Web Server's email is down.

I previously used IntelliLock's generated code, and I seem to remember that it did not cause a Charge to the Credit Card when email was wrong or not working. (IntelliLock license handling did not work, and support is dead: That's why I am here)

, edited

Forgot one piece of information:

The Default web.config file did not work on our WinHost Web Server: I had to remove the section below from the beginning of the file:Otherwise I got Exeptions from the Web Server claiming - scriptResourceHandler- jsonSerializationetc was Duplicate entries....

I am NOT an expert in this field, but found that removing the section below removed the problem(Hopefully not introducing other problems)

<configSections> <sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"> <sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"> <section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/> <sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"> <section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="Everywhere"/> <section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/> <section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/> <section name="roleService" type="System.Web.Configuration.ScriptingRoleServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/> </sectionGroup> </sectionGroup> </sectionGroup> </configSections>

>> "But there is a potential "bomb" if for some reason the Web Server's email is down."

The example automation code is written so that if a customer's credit card is charged then a product key is generated. It doesn't try to verify the email beyond some very basic "typo detection". If the email doesn't exist, or if the customer typed it wrong, it's not something that can be checked synchronously (i.e. at order time).

So, this is by design. But you can change it if you want.

Thanks,

However, there are a few strange things going on here:

1) Now, 3-4 hours after I stopped testing, the Customer (me at another email), gets sent Emails (from the the my Seller email) with License Keys: I have received 5 so far (I did 10-12 Live tests), where I did not receive any License Emails for the first 5-6 since the Web Server email was not working, but received License Emails immediately after the Email Issue was fixed: It seems to add up to the number of attempted Purchases..

Q1: Does LimeLM cache requests and retry sending License Keys for previous failed attempts?

2) Now My Total Product Keys = 66 and Allocated activations = 66 allthough I have only tried to buy 10-12.Q2a: My Solo Account has 300 activations: Is that 300 activations pr. month since the payment is monthly? (Do I get new 300 activations for next month?)

Q2b: Is there a way I can get back my "lost" activations due to this error? I was not expecting too loose money due to this unforeseen behavior when testing..

3) On the web.config problem:

Q3: Do you have any idea why I had to delete the setting in the Web.config file, and will it cause problems?

Regarding improving the Email checking you said:

<<If the email doesn't exist, or if the customer typed it wrong, it's not something that can be checked synchronously (i.e. at order time). So, this is by design. But you can change it if you want.>>

If it is something that can't be checked at order time, how and where can I, as you say, change this behavior?

Also, in the case of an Email Config Error, the WebAPI now seems to retry 10-12 times, but it sends a NEW License Key on every Retry instead of sending the SAME Key on each retry! This can't be the intended behavior...

See my log below for 1 Purchase where the use of the Web Server Email was wrong so exceptions was thrown:

payment.aspx.cs Calledpaychecker.aspx.cs CalledReceiver Email: geiroves@objective.no. PaymentSettings.PayPalEmail: geiroves@objective.nopaychecker.aspx.cs ValidatePP payment_status: Completedpaychecker.aspx.cs Paypal Expected Price: 1.00paychecker.aspx.cs Price Validatedpaychecker.aspx.cs Paypal Order VerifiedPaymentSettings SendPKeys() Called:quantity: 1email: geiroves@online.nofirst: Geir Ovelast: SkjvikSendPKeys pkeyList: [Snipped]

You need to ensure that your script is contacting the PayPal servers and telling it that everything was successful. If you don't do that then PayPal will keep pinging your servers with the exact same success response and your script will keep generating and sending keys.

So the problem here is PayPal contacting your servers.

More information is needed to give you useful help. Logs would be helpful. Attaching a debugger and verifying a successful response from PayPal (step through the code one line at a time).

Wyatt,

I would appreciate if you answer my questions Q1 - Q3 above: I have spent a lot of time on this, and quite some time describing the problem here on the forum!

As I said in my first post: Everything is OK now, so my code is indeed communicating with the PayPal servers: I have also verified that through the simulator. (I have done this earlier with IntelliLock, so the communication with PayPal is not new to me)

However, the problems described above occur if the sending the email with the License throws an exception.Log for that is posted above.

Even if my Communication with PayPal failed, the WebAPI should NOT generate 10-12 new licenses for one Customer Request!

Update: I went to my Account and Deleted all Keys. However, My Account Page show that 58 keys are still Activated?

Update2:I also see that the problem of Multiple Keys generated has been reported before:https://wyday.com/forum/t/843/paypal-validation-fails/

>> "I would appreciate if you answer my questions Q1 - Q3 above: I have spent a lot of time on this, and quite some time describing the problem here on the forum!"

Sorry, it got lost in the noise of the log.

>> "Q1: Does LimeLM cache requests and retry sending License Keys for previous failed attempts?"

No.

>> "2) Now My Total Product Keys = 66 and Allocated activations = 66 allthough I have only tried to buy 10-12."

A product key can have more than 1 allowed activation. It sounds like you might be generating keys with more than 1 allowed activation. See: https://wyday.com/limelm/help/activations/

>> "Q2a: My Solo Account has 300 activations: Is that 300 activations pr. month since the payment is monthly?(Do I get new 300 activations for next month?)"

It's the total limit: https://wyday.com/limelm/help/activations/#plans

>> "Q2b: Is there a way I can get back my "lost" activations due to this error?I was not expecting too loose money due to this unforeseen behavior when testing.."

Delete the keys and you get back the activations. See: https://wyday.com/limelm/help/activations/#faq

>> "3) On the web.config problem:

Q3: Do you have any idea why I had to delete the setting in the Web.config file, and will it cause problems?"

Sorry, no, we don't use ASP.NET internally -- googling for an answer about configuring ASP.NET is probably a safer bet.

>> "Even if my Communication with PayPal failed, the WebAPI should NOT generate 10-12 new licenses for one Customer Request!"

My advice is to switch to something like FastSpring or Stripe and let them handle the payment processing. Our example only generates "multiple keys per request" if things are failing on your server. Namely, you're not correctly handling the PayPal requests. Our script is good, but it's not perfect (it's not designed to handle server misconfigurations) and it's not magic.

>> "I also see that the problem of Multiple Keys generated has been reported before:https://wyday.com/forum/t/843/paypal-validation-fails/"

That was an example of the customer sending product keys for a "PENDING" response from PayPal. Our unmodified examples don't do that -- they only send keys on "COMPLETED".

>> "Update: I went to my Account and Deleted all Keys. However, My Account Page show that 58 keys are still Activated?"

I just looked at your account. LimeLM is correctly reporting the number of keys and activations. You can use the advanced search to see exactly under which version the keys are located.

Hello Wyatt,

Thanks for the answers. I have now deleted all keys and all is well in that department.

I will look into how / where to verify email before PayPal Charging takes place (If Possible)

Any Tips on where to start?

The best place to start is running a test purchase with a debugger attached to the paychecker script and step through the code one line at a time. That will let you see what is going wrong.

Hello,

I do not run the Server myself, so I cannot attach any debugger: Only write to a Log for tracing.

However, I think this was a problem I created myself, and I believe the problem is fixed now!

Thanks for all your help Wyatt!