View previous topic :: View next topic |
Author |
Message |
dopdahl
Joined: 27 Oct 2013 Posts: 27
|
Posted: Sun Jan 12, 2014 4:09 pm Post subject: Product Variant to handle Subscription Model 'Trial Period' |
|
|
Hi:
Just getting things set up and down to one last issue I believe.
My IPN notifications are failing because my product is a subscription based product that has a trial period. The trial period has one price for a 14 day period, and then when the period expires, the subscription moves into a monthly billing cycle with a different price.
My ILS product is defined with the monthly price and so the transaction fails when IPN posts the purchase with the trial price.
I would just like to verify that creating a 'Product Variant' is the correct way to deal with this situation. Or is there another way?
Looking at this a bit more, I'm not sure this will work. Is there a solution short of buying the source and changing it?
Thanks! |
|
Back to top |
|
|
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Mon Jan 13, 2014 5:57 am Post subject: |
|
|
You should be able to get this to work with a Product Variant - but I'm not sure. It depends on exactly how PayPal handles this. Normally with a subscription there is a subscription ID associated with each payment. When a subsequent payment is made IPN.NET uses the subscription ID to identify the original transaction and find the associated license key which it then updates with a new expiry date.
So provided the initial payment and the subsequent monthly billing payments have the same subscription ID you should be OK to setup a separate ProductVariant with a different price and ExpiryDays for the initial period. I haven't tried this however so I can't be 100% certain it will work. Let us know how you go. _________________ Infralution Support |
|
Back to top |
|
|
dopdahl
Joined: 27 Oct 2013 Posts: 27
|
Posted: Mon Jan 13, 2014 12:42 pm Post subject: |
|
|
I'll try it out... but it looks to me like a Product Variant is a different product. The requirement is to have the user purchase a single product and use the built in PayPal trial period for subscriptions. Am I right about this?
I'll see if I can get it to work. If not it sounds like the only solution is to modify to source to approve when either price is posted... |
|
Back to top |
|
|
dopdahl
Joined: 27 Oct 2013 Posts: 27
|
Posted: Mon Jan 13, 2014 1:37 pm Post subject: |
|
|
Yeah, ok. So I created a product variant with a new Product Name... which is required... set it up to 'import sales as parent product'... though that probably doesn't matter...
I used the same IPN Item Name as the parent product and the same IPN Item Number.
Changed the 'cost per unit' and still got the price check error
"Incorrect payment. Expected $99.9900, got $0.30"
Any ideas? Or are we talking about a source code change? |
|
Back to top |
|
|
dopdahl
Joined: 27 Oct 2013 Posts: 27
|
Posted: Mon Jan 13, 2014 1:43 pm Post subject: |
|
|
The other thing that is a concern is that PayPal is confirming the payment as successful, even though IPN.NET is throwing this error.
That doesn't seem like the correct behavior and a big issue. |
|
Back to top |
|
|
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Mon Jan 13, 2014 9:45 pm Post subject: |
|
|
PayPal accepts the payment before notifying your IPN.NET handler. So there is no way for them to reject a payment because your IPN.NET handler failed for some reason. If this does occur (because there is something wrong with your IPN.NET setup) then you just have to handle the payment manually. Once you have everything configured correctly it shouldn't occur.
The fact that both payments are using the same IPN Item Name is the problem. That is how IPN.NET identifies which product is being purchased - so it has no way of telling the difference between the two payments. If you can't configure PayPal to change this (which you may not be able to) then the only solution would be to purchase and modify the source code. _________________ Infralution Support |
|
Back to top |
|
|
dopdahl
Joined: 27 Oct 2013 Posts: 27
|
Posted: Tue Jan 14, 2014 1:54 am Post subject: |
|
|
With regard to IPN.NET failures, understood.
As for the primary issue, yeah, there's no way to setup a second item with PayPal because the payments are for the same item and the same subscription, just different in amount.
Seems like it's something that you guys should handle since it's part of PayPal's subscription model, and has been for years. Even something as simple as supporting multiple prices in the price field (separated by commas or something) would do the trick. |
|
Back to top |
|
|
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Tue Jan 14, 2014 5:55 am Post subject: |
|
|
It's not quite as simple as just allowing multiple prices for a single product - since each price should be associated with a different number of expiryDays. ie for their initial 14 day subscription you don't want them getting a license that lasts for 31 days.
We'll put support for this on our feature request list and look at it for the next minor (non-bugfix) release of IPN.NET. We may be able to support it by allowing you to define multiple Variant Products with the same IPN Item Number and then search for the actual product based on price.
If you need a solution more urgently then this (it may be a month or more) then you will need to purchase the source code. _________________ Infralution Support |
|
Back to top |
|
|
dopdahl
Joined: 27 Oct 2013 Posts: 27
|
Posted: Tue Jan 14, 2014 12:51 pm Post subject: |
|
|
Sounds like that will have to be it...
I don't think I need to worry about the expiry. If the user doesn't cancel the subscription by the end of the trial duration, they'll be billed by paypal anyway which I assume will result in a new IPN notification and update to the license's expiry date. If they do cancel before the trial is up... the license will deactivate on the Product's recurring billing interval which in my case is only another 2 weeks... not a big concern for me. At least I think that's how it will work without separate expiries.
I have no problem reworking the code if necessary, even if I can just get it patched up to function.
If I buy the code will you be available to answer code specific questions if I have any? |
|
Back to top |
|
|
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Tue Jan 14, 2014 10:44 pm Post subject: |
|
|
Yes - although generally for questions about the source code we prefer to handle them via email. _________________ Infralution Support |
|
Back to top |
|
|
dopdahl
Joined: 27 Oct 2013 Posts: 27
|
Posted: Wed Jan 15, 2014 2:00 am Post subject: |
|
|
Hi:
Ok, worked things out easily with the source. Everything is working fine, although it's a bit of a hack because I didn't buy the ILS source so I can't really make it flexible.
Nonetheless it works for my purposes... No issues with the source... Compiled right up and had it working within an hour.
Thanks again. |
|
Back to top |
|
|
|