[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SF.net SVN: ledger-smb: [189] trunk/LedgerSMB



Revision: 189
          http://svn.sourceforge.net/ledger-smb/?rev=189&view=rev
Author:   einhverfr
Date:     2006-10-03 21:15:49 -0700 (Tue, 03 Oct 2006)

Log Message:
-----------
Minor bugs fixed in credit card processing

Modified Paths:
--------------
    trunk/LedgerSMB/CreditCard/TrustCommerce/Config.pm
    trunk/LedgerSMB/CreditCard/TrustCommerce.pm
    trunk/LedgerSMB/CreditCard.pm

Modified: trunk/LedgerSMB/CreditCard/TrustCommerce/Config.pm
===================================================================
--- trunk/LedgerSMB/CreditCard/TrustCommerce/Config.pm	2006-10-04 02:10:51 UTC (rev 188)
+++ trunk/LedgerSMB/CreditCard/TrustCommerce/Config.pm	2006-10-04 04:15:49 UTC (rev 189)
@@ -15,8 +15,13 @@
 # TrustCommerce configuration Information goes Here
 
 
-package CreditCard::TrustCommerce::Config;
+package TrustCommerce;
 
-%baseparams = ( customer_id => 'MyCustomerID',
-	password => 'MyPassword'
+
+%baseparams = ( custid => '000000',
+	password => 'password',
 );
+
+$debug = 0;
+
+1;

Modified: trunk/LedgerSMB/CreditCard/TrustCommerce.pm
===================================================================
--- trunk/LedgerSMB/CreditCard/TrustCommerce.pm	2006-10-04 02:10:51 UTC (rev 188)
+++ trunk/LedgerSMB/CreditCard/TrustCommerce.pm	2006-10-04 04:15:49 UTC (rev 189)
@@ -16,16 +16,14 @@
 # Simple TrustCommerce API using Net::TCLink
 
 package TrustCommerce;
-use LedgerSMB::CreditCard::TrustCommerce::Config ();
-use LedgerSMB::CreditCard::Config ();
+use LedgerSMB::CreditCard::Config;
+use LedgerSMB::CreditCard::TrustCommerce::Config;
 use Net::TCLink;
 
-%baseparams = ${Config::baseparams};
-$debug = ${Config::debug};
+$debug = $1;
 
 sub sale {
 	$form = shift @_;
-	my %params = %baseparams;
 	$params{action} = 'sale';
 	$params{amount} = $form->{amount} * 100;
 	$params{track1} = $form->{track1};
@@ -34,6 +32,9 @@
 }
 
 sub process {
+		for (keys %params){
+			print "$_=  ".$params{$_}."\n";
+		}
 	my %result = Net::TCLink::send(\%params);
 	$form->{status} = $result{status};
 	if ($result{status} eq 'decline'){
@@ -47,10 +48,12 @@
 		"$result{errortype}\n";
 	if ($debug){
 		print STDERR "Full Result:\n";
+
 		for (keys %result){
-			print "$_=  ".$result{$_}."\n";
+			print STDERR "$_=  ".$result{$_}."\n";
 		}
 	}
+		
 	%result;
 }
 

Modified: trunk/LedgerSMB/CreditCard.pm
===================================================================
--- trunk/LedgerSMB/CreditCard.pm	2006-10-04 02:10:51 UTC (rev 188)
+++ trunk/LedgerSMB/CreditCard.pm	2006-10-04 04:15:49 UTC (rev 189)
@@ -22,3 +22,5 @@
 	import $gateway_module qw(sale credit); 
 }
 
+1;
+


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.