adding cash paydriver, paydriver management

This commit is contained in:
Martin Kamerbeek 2008-03-24 16:39:42 +00:00
parent 4b4f389586
commit fb77b80603
9 changed files with 461 additions and 57 deletions

View file

@ -91,7 +91,8 @@ The extended status message that came back from the payment gateway when trying
sub completePurchase {
my ($self, $cart, $transactionCode, $statusCode, $statusMessage) = @_;
$cart->completePurchase;
$cart->onCompletePurchase;
#$cart->completePurchase;
$self->update({
transactionCode => $transactionCode,
isSuccessful => 1,
@ -372,7 +373,7 @@ sub update {
$newProperties->{couponId} = $cart->get('couponId');
$newProperties->{couponTitle} = '';
$newProperties->{couponDiscount} = '';
$newProperties->{amount} = $cart->getSubtotal + $newProperties->{couponDiscount} + $newProperties->{shippingPrice} + $newProperties->{taxes};
$newProperties->{amount} = $cart->calculateSubtotal + $newProperties->{couponDiscount} + $newProperties->{shippingPrice} + $newProperties->{taxes};
foreach my $item (@{$cart->getItems}) {
$self->addItem({item=>$item});
}