fix - Commerce - emailed information ( ITransact overcharging )

This commit is contained in:
Roy Johnson 2006-06-23 19:01:27 +00:00
parent 6dfd784094
commit 03509ca1be
2 changed files with 14 additions and 3 deletions

View file

@ -19,6 +19,8 @@
- fix: WG user not logged in Apache
- Upgraded to TinyMCE 2.0.6.1, which fixes a number of bugs that WebGUI users
have been experiencing with the Rich Editor.
- fix: Very very bad commerce bug that caused ITransact to charge the user more
than it was supposed to and more than it told them it was charging.
6.99.4
- fix: better checking of selected template type

View file

@ -478,7 +478,7 @@ my %transactionData = %{$self->{_transactionParams}};
<TransactionData>
<VendorId>".$self->get('vendorId')."</VendorId>
<VendorPassword>".$self->get('password')."</VendorPassword>
<HomePage>".$self->session->setting->get("companyURL")."</HomePage>";
<HomePage>".$self->session->setting->get("companyURL")."</HomePage>\n";
if ($self->{_recurring}) {
$xml .=
@ -487,7 +487,7 @@ my %transactionData = %{$self->{_transactionParams}};
<RecurReps>$transactionData{TERM}</RecurReps>
<RecurTotal>$transactionData{AMT}</RecurTotal>
<RecurDesc>$transactionData{DESCRIPTION}</RecurDesc>
</RecurringData>";
</RecurringData>\n";
};
$xml .=
@ -505,10 +505,11 @@ my %transactionData = %{$self->{_transactionParams}};
# $data =~ s/>/&gt;/sg;
# $data =~ s/"/&quot;/sg;
$data =~ tr/A-Za-z0-9 //dc;
my $itemPrice = $_->{amount} / $_->{quantity};
$xml .=
" <Item>
<Description>".$data."</Description>
<Cost>".sprintf('%.2f', $_->{amount})."</Cost>
<Cost>".sprintf('%.2f', $itemPrice)."</Cost>
<Qty>".$_->{quantity}."</Qty>
</Item>\n";
}
@ -527,7 +528,15 @@ my %transactionData = %{$self->{_transactionParams}};
</TransactionData>
</SaleRequest>";
##
## Nice for debugging
##
# open(DAT,">/tmp/itransact.xml") || die("Cannot Open File");
# print DAT "$xml";
# close(DAT);
#
$self->session->errorHandler->warn("<pre>".$xml."</pre>");
my $xmlTransactionScript = 'https://secure.paymentclearing.com/cgi-bin/rc/xmltrans.cgi';
# Set up LWP to post the XML to iTransact.