add payment processing interface

This commit is contained in:
JT Smith 2008-03-24 18:27:33 +00:00
parent e8fe7e1491
commit 31729dc14a
7 changed files with 202 additions and 22 deletions

View file

@ -67,14 +67,18 @@ sub addItem {
#-------------------------------------------------------------------
=head2 completePurchase ( cart, transactionCode, statusCode, statusMessage )
=head2 completePurchase ( cart transactionCode, statusCode, statusMessage )
See also denyPurchase(). Completes a purchase by updating the transaction as a success, and clearing the cart of it's items.
See also denyPurchase(). Completes a purchase by updating the transaction as a success, and clearing the cart of it's items.
=head3 cart
A reference to the current cart that's full of items just purchased.
=head3 paydriver
A reference to the pay driver that just completed the transaction.
=head3 transactionCode
The transaction id or code given by the payment gateway.
@ -92,7 +96,6 @@ The extended status message that came back from the payment gateway when trying
sub completePurchase {
my ($self, $cart, $transactionCode, $statusCode, $statusMessage) = @_;
$cart->onCompletePurchase;
#$cart->completePurchase;
$self->update({
transactionCode => $transactionCode,
isSuccessful => 1,