- Fixed recurring payment cancelation and added error handling
- Made transactions with recurring items recurring - Fixed some bugs in the email receipt code - Added email receipt template to migrated plugins
This commit is contained in:
parent
2c57721e20
commit
b4a45c6ada
4 changed files with 36 additions and 15 deletions
|
|
@ -578,6 +578,7 @@ sub processTransaction {
|
|||
$transactionProperties->{ paymentMethod } = $self;
|
||||
$transactionProperties->{ cart } = $cart;
|
||||
$transactionProperties->{ paymentAddress } = $paymentAddress if defined $paymentAddress;
|
||||
$transactionProperties->{ isRecurring } = $cart->requiresRecurringPayment;
|
||||
|
||||
# Create a transaction...
|
||||
my $transaction = WebGUI::Shop::Transaction->create( $self->session, $transactionProperties );
|
||||
|
|
@ -678,25 +679,25 @@ sub sendNotifications {
|
|||
$var{items} = \@items;
|
||||
|
||||
# render
|
||||
my $template = WebGUI::Asset::Template->new($session, $session->setting->get("receiptEmailTemplateId"));
|
||||
my $template = WebGUI::Asset::Template->new( $session, $self->get("receiptEmailTemplateId") );
|
||||
my $inbox = WebGUI::Inbox->new($session);
|
||||
|
||||
# purchase receipt
|
||||
$inbox->addMessage(
|
||||
$inbox->addMessage( {
|
||||
message => $template->process(\%var),
|
||||
subject => $i18n->get('receipt subject').' '.$transaction->get('orderNumber'),
|
||||
userId => $transaction->get('userId'),
|
||||
status => 'completed',
|
||||
);
|
||||
} );
|
||||
|
||||
# shop owner notification
|
||||
$var{viewDetailUrl} = $url->page('shop=transaction;method=view;transactionId='.$transaction->getId,1);
|
||||
$inbox->addMessage(
|
||||
$inbox->addMessage( {
|
||||
message => $template->process(\%var),
|
||||
subject => $i18n->get('a sale has been made').' '.$transaction->get('orderNumber'),
|
||||
groupId => $self->get('saleNotificationGroupId'),
|
||||
status => 'unread',
|
||||
);
|
||||
} );
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue