Infralution Support Forum Index Infralution Support
Support groups for Infralution products
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Product Variant to handle Subscription Model 'Trial Period'

 
Post new topic   Reply to topic    Infralution Support Forum Index -> IPN.NET Support
View previous topic :: View next topic  
Author Message
dopdahl



Joined: 27 Oct 2013
Posts: 27

PostPosted: Sun Jan 12, 2014 4:09 pm    Post subject: Product Variant to handle Subscription Model 'Trial Period' Reply with quote

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
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Mon Jan 13, 2014 5:57 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
dopdahl



Joined: 27 Oct 2013
Posts: 27

PostPosted: Mon Jan 13, 2014 12:42 pm    Post subject: Reply with quote

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
View user's profile Send private message
dopdahl



Joined: 27 Oct 2013
Posts: 27

PostPosted: Mon Jan 13, 2014 1:37 pm    Post subject: Reply with quote

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
View user's profile Send private message
dopdahl



Joined: 27 Oct 2013
Posts: 27

PostPosted: Mon Jan 13, 2014 1:43 pm    Post subject: Reply with quote

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
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Mon Jan 13, 2014 9:45 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
dopdahl



Joined: 27 Oct 2013
Posts: 27

PostPosted: Tue Jan 14, 2014 1:54 am    Post subject: Reply with quote

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
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Tue Jan 14, 2014 5:55 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
dopdahl



Joined: 27 Oct 2013
Posts: 27

PostPosted: Tue Jan 14, 2014 12:51 pm    Post subject: Reply with quote

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
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Tue Jan 14, 2014 10:44 pm    Post subject: Reply with quote

Yes - although generally for questions about the source code we prefer to handle them via email.
_________________
Infralution Support
Back to top
View user's profile Send private message Visit poster's website
dopdahl



Joined: 27 Oct 2013
Posts: 27

PostPosted: Wed Jan 15, 2014 2:00 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Infralution Support Forum Index -> IPN.NET Support All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group