Reply
Contributor
Posts: 22
Registered: ‎07-20-2012

Is this code correct for 3 months 3 trial?

Hi, my ARB works but I just had to make a change to it. I checked my test Authorize.net and I don't see the transaction. I dont see it because it occurs once...so I have to wait for 3 months to see this transaction??

 

I want to have a trial period of 3 months, zero fee. Then one time occurance for xxx amount.

 

Is this correct?

 

sub.paymentSchedule.totalOccurrences = 1;

//occurs once

        sub.paymentSchedule.totalOccurrencesSpecified =

true;

        sub.amount =

decimal.Parse(lblSetupFee.Text);

        sub.amountSpecified =

true;

       

//******* trial period

        sub.trialAmount = 0.0M;

        sub.trialAmountSpecified =

true;

        sub.paymentSchedule.trialOccurrences = 3;

//-- only allow one free trial

        sub.paymentSchedule.trialOccurrencesSpecified =

true;

       

//******* end of trial period

 

---- I do see this transaction tho. I do them in 2 separate calls. This one is 3 months free, then occurs once a month

 

sub.paymentSchedule.totalOccurrences = 999;

  sub.paymentSchedule.totalOccurrencesSpecified =

true;

        sub.amount =

decimal.Parse(price);

        sub.amountSpecified =

true;

       

//******* trial period

        sub.trialAmount = 0.0M;

        sub.trialAmountSpecified =

true;

        sub.paymentSchedule.trialOccurrences = 3;

//-- only allow one free trial

        sub.paymentSchedule.trialOccurrencesSpecified =

true;

       

//******* end of trial period

Expert
Posts: 4,525
Registered: ‎03-08-2010

Re: Is this code correct for 3 months 3 trial?

http://www.authorize.net/support/ARB_SOAP_guide.pdf

Page 14

totalOccurrences

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 nu

mber should include the Trial Occurrences

Contributor
Posts: 22
Registered: ‎07-20-2012

Re: Is this code correct for 3 months 3 trial?

ok, so one mistake i have is it should be 9999 not 999. I corrected that..

 

But now, I still don't know why I don't see the transaction for trial period of 3 months and totalocuurance = 1 (if I change it to 9999...i just tried it as test)...then I see both transactions: the one that's totalocurrance of 9999 and the one I changed from 1 to 9999

Expert
Posts: 4,525
Registered: ‎03-08-2010

Re: Is this code correct for 3 months 3 trial?

[ Edited ]
If a trial period is specified, this number should include the Trial Occurrences
I think "this" referring to totalOccurrences
Contributor
Posts: 22
Registered: ‎07-20-2012

Re: Is this code correct for 3 months 3 trial?

And I have it:

 

sub.amount =decimal.Parse(lblSetupFee.Text); //the amount that should be charged after 3 months...and it should be charged once

sub.paymentSchedule.totalOccurrences = 1;  // i want it to occur only once

sub.trialAmount = 0.0M; //the trial amount is zero for 3 months

 

sub.paymentSchedule.trialOccurrences = 3; // free trial for 3 months

 

and after 3 months, it should be charged once.

 

I run the code and I dont see the transaction. If I change "1" to 9999 ..then I see it. I'm guessing it's because I want it to occur once and the transaction will show up in 3 months. Not sure if this is correct tho.

Highlighted
Expert
Posts: 4,525
Registered: ‎03-08-2010

Re: Is this code correct for 3 months 3 trial?

what happened if you change it like

sub.paymentSchedule.totalOccurrences = 4;