- Changed Cash plugin to use processTransaction
- Added (as of yet empty) notification templates - Fixed a typo in sendNotification
This commit is contained in:
parent
a5d3403bcc
commit
ec8bcd5ff8
3 changed files with 3 additions and 11 deletions
Binary file not shown.
|
|
@ -533,15 +533,12 @@ sub sendNotifications {
|
|||
my $session = $self->session;
|
||||
my %var = (); # this needs to be filled in with transaction data for these emails
|
||||
|
||||
|
||||
|
||||
|
||||
my $i18n = WebGUI::International->new($session,'PayDriver');
|
||||
my $inbox = WebGUI::Inbox->new($session);
|
||||
$inbox->addMessage({
|
||||
userId => $transaction->get('userId'),
|
||||
subject => $i18n->get('thank you for your order'),
|
||||
message => WebGUI::Asset::Template->new($session, $self->get('emailReceiptTemplateId'))->process(\%var),
|
||||
message => WebGUI::Asset::Template->new($session, $self->get('receiptEmailTemplateId'))->process(\%var),
|
||||
status => 'completed',
|
||||
});
|
||||
$inbox->addMessage({
|
||||
|
|
|
|||
|
|
@ -235,13 +235,8 @@ sub www_pay {
|
|||
|
||||
my $billingAddress = $self->getBillingAddress( $session->scratch->get( 'ShopPayDriverCash_billingAddressId' ) );
|
||||
|
||||
# Create a transaction and complete the purchase
|
||||
my $transaction = WebGUI::Shop::Transaction->create( $session, {
|
||||
cart => $cart,
|
||||
paymentAddress => $billingAddress,
|
||||
paymentMethod => $self,
|
||||
});
|
||||
$transaction->completePurchase( $cart, 'CASH', 'OK', 'Cash payment' );
|
||||
# Complete the transaction
|
||||
$self->processTransaction( $billingAddress );
|
||||
|
||||
return $session->style->userStyle('Thank you for ordering');
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue