Page 1 of 1
Fixed Term with AuthNet
![Post Post](styles/custom/imageset/icon_post_target.gif)
Posted:
November 27th, 2011, 9:42 pm
by biffhardwell
I'm planning on using AuthNet for credit card processing. I don't see a way in the shortcode descriptions to do a fixed term. Here's what I want:
* 2 week free trial. I collect their credit card information and get the ARB stuff set up in the background. "If you like the content, do nothing and you'll automatically be billed for continuing access!"
* 6 payments of $x every 4 weeks. I'll be dripping content to them throughout this time.
* If they cancel, they retain whatever access they had at that time.
* If they complete all 6 payments, they retain access to everything, plus some bonus material.
How can I accomplish this?
Re: Fixed Term with AuthNet
![Post Post](styles/custom/imageset/icon_post_target.gif)
Posted:
November 28th, 2011, 7:21 pm
by biffhardwell
In looking at the ARB API docs at
http://www.authorize.net/support/ARB_guide.pdf, I see on page 11
totalOccurences:
Value: Number of billing occurrences or payments for the subscription Format: Up to 4 digits
Notes: To submit a subscription with no end date (an ongoing subscription), this field must be submitted with a value of “9999.”
If a trial period is specified, this number should include the Trial Occurrences.
This seems to be the right thing on the Authorize.NET side. Is there support on the s2member side for this?
Re: Fixed Term with AuthNet
![Post Post](styles/custom/imageset/icon_post_target.gif)
Posted:
November 29th, 2011, 2:09 pm
by biffhardwell
On line 56 of authnet-sp-checkout-in.inc.php I see
* @todo Add support for `rrt=""` Attribute.
Does this mean I can't use s2member for a fixed term subscription?
Re: Fixed Term with AuthNet
![Post Post](styles/custom/imageset/icon_post_target.gif)
Posted:
November 29th, 2011, 7:20 pm
by biffhardwell
Am I in the right forum for company support for s2member pro? Is there another preferred way of getting answers from primo themes?
Re: Fixed Term with AuthNet
![Post Post](styles/custom/imageset/icon_post_target.gif)
Posted:
November 29th, 2011, 10:40 pm
by Eduan
Yes this is the right forum, but you need to wait that your turn comes.
Re: Fixed Term with AuthNet
![Post Post](styles/custom/imageset/icon_post_target.gif)
Posted:
November 29th, 2011, 11:17 pm
by biffhardwell
Thanks Eduan!
One other aspect occurred to me, in addition to the fundamental one of getting Authorize.net to work correctly: The current EOT handling is either downgrade or delete, and I want different behavior (maintain). I want to process the EOT, so I know the user has cancelled and shouldn't get new content, but I want everything else to stay in place.
I'm writing a little plugin to do content protection of the drip-fed content, and this would be simple to implement if I had the timestamp of the EOT event. No EOT = they're still paying, EOT = they're frozen at the level at which that happened.
What's the best way of handling that?
Also, with regards to the ARB question - I'm very open to workarounds too. For example, having the system itself force a cancellation after 6 payments. If that's easier than doing it right, would appreciate pointers for how to do it.
Re: Fixed Term with AuthNet
![Post Post](styles/custom/imageset/icon_post_target.gif)
Posted:
November 30th, 2011, 7:00 pm
by Cristián Lávaque
Thanks for your patience Biff! Sorry I didn't get to you sooner.
That's right, the Auth.Net implementation doesn't handle fixed number of terms yet. And the EOT has that limitation you mention too. All these should be resolved very soon in a coming release of s2Member, around Feb-Mar 2012.
In the meantime, it's great you're trying to make it work for your model. I'm notifying Jason, the Lead Developer, about your questions so he can give some insight and ideas to try.
![Smile :)](https://www.primothemes.com/forums/images/smilies/icon_e_smile.gif)
Re: Fixed Term with AuthNet
![Post Post](styles/custom/imageset/icon_post_target.gif)
Posted:
November 30th, 2011, 8:29 pm
by biffhardwell
Thanks Cristian. I'm planning on having this site go live at the end of December, so can't wait for the real fixes if they're out in the March timeframe. Would very much appreciate pointers for potential workarounds, kludges, or magic incantations.
I'm loving the rest of the functionality of s2member (I'm converting over from Wishlist, and have also tried to use wpmu's Membership) so I'm really keen on getting over this final hurdle.
Re: Fixed Term with AuthNet
![Post Post](styles/custom/imageset/icon_post_target.gif)
Posted:
December 2nd, 2011, 12:46 am
by Jason Caldwell
Thanks for the heads up on this thread.
Yes, that's correct. While Authorize.Net does support this, s2Member does not yet. It is supported by s2Member's PayPal Pro integration, so that might be an option for you. Otherwise, if you'd like to hack this in, you can take a look at this file:
/s2member-pro/includes/classes/gateways/authnet-checkout-in.inc.php
Search for occurrences of: $authnet["x_total_occurrences"], and hard code what you need. Or, perhaps you can come up with something a bit more dynamic. That's the best I can do at this time. The next major release of s2Member Pro ( coming in 2012 ) will resolve this.
Re: Fixed Term with AuthNet
![Post Post](styles/custom/imageset/icon_post_target.gif)
Posted:
December 2nd, 2011, 2:11 am
by biffhardwell
Jason, that's a great tip, thanks. I'll follow that to see if I can hack together something.
As far as the EOT handling, do you have any suggestions? I was thinking of letting the system downgrade the user upon receiving a notification from Auth.net, but then using the s2member notification API to send myself a message, where I'd then make them a Level1 member again. Does that approach make sense?
Thanks again for the tip on the fixed term. I'm currently deep into getting the jwplayer working with RTMP on CloudFront - you've done a terrific job on that, lots of non-trivial stuff behind the scenes to make it work!
Re: Fixed Term with AuthNet
![Post Post](styles/custom/imageset/icon_post_target.gif)
Posted:
December 2nd, 2011, 3:50 am
by Jason Caldwell
Hey, thanks for the follow-up.~ and for the KUDOS, much appreciated!
As far as the EOT handling, do you have any suggestions? I was thinking of letting the system downgrade the user upon receiving a notification from Auth.net, but then using the s2member notification API to send myself a message, where I'd then make them a Level1 member again. Does that approach make sense?
I don't see anything wrong with that approach. It's not ideal, but probably the closest you'll get at this time, given the current limitations of Authorize.Net integration in this regard. Your custom API script should be able to handle the promotion back to Level #1 automatically though.
Something like this perhaps.- Code: Select all
<?php
$user_id = 123;
$user = new WP_User($user_id);
$user->set_role("s2member_level1");
?>
Re: Fixed Term with AuthNet
![Post Post](styles/custom/imageset/icon_post_target.gif)
Posted:
December 2nd, 2011, 6:26 pm
by biffhardwell
Thanks, that looks straightforward. I'll be doing this tomorrow, so I'll see just how twisty it gets in the real world...
Appreciate the help. One of the great selling points of s2member is that the source is available for just this sort of hacking - that's a big reason why I'm getting rid of Wishlist.