Recurring payment stuff fixes, forgot ITransact.pm in last commit.

This commit is contained in:
Martin Kamerbeek 2008-05-26 21:31:48 +00:00
parent 74b3d3def6
commit dc30ecccbe
3 changed files with 109 additions and 43 deletions

View file

@ -383,6 +383,32 @@ sub getPrice {
#-------------------------------------------------------------------
=head2 getRecurInterval
Returns the duration of this subscription in a format used by the commerce system.
=cut
sub getRecurInterval {
my $self = shift;
return $self->get('duration');
}
#-------------------------------------------------------------------
=head2 isRecurring
Tells the commerce system this Sku is recurring.
=cut
sub isRecurring {
return 1;
}
#-------------------------------------------------------------------
=head2 onCompletePurchase
Applies the first term of the subscription. This method is called when the payment is successful.