This shows you the differences between two versions of the page.
developer:soap-1.2:methods:runchecksale [2010/02/12 10:33] epouchak created |
developer:soap-1.2:methods:runchecksale [2010/09/15 15:53] (current) irina |
||
---|---|---|---|
Line 4: | Line 4: | ||
Run a new check sale transaction. | Run a new check sale transaction. | ||
- | |||
- | |||
- | |||
- | |||
Line 162: | Line 158: | ||
End If | End If | ||
+ | </code> | ||
+ | |||
+ | ==== .NET C# ==== | ||
+ | <code c> | ||
+ | usaepay.TransactionRequestObject tran = new usaepay.TransactionRequestObject(); | ||
+ | |||
+ | tran.Details = new usaepay.TransactionDetail(); | ||
+ | tran.Details.Amount = 1.00; | ||
+ | tran.Details.AmountSpecified = true; | ||
+ | tran.Details.Invoice = "1234"; | ||
+ | tran.Details.Description = "Sample Check Sale"; | ||
+ | |||
+ | tran.CheckData = new usaepay.CheckData(); | ||
+ | tran.CheckData.Account = "1112223333"; | ||
+ | tran.CheckData.Routing = "123456789"; | ||
+ | tran.CheckData.DriversLicense = "D5555555"; | ||
+ | tran.CheckData.DriversLicenseState = "CA"; | ||
+ | |||
+ | tran.AccountHolder = "Test Guy"; | ||
+ | |||
+ | usaepay.TransactionResponse response = new usaepay.TransactionResponse(); | ||
+ | |||
+ | try | ||
+ | { | ||
+ | response = client.runCheckSale(token, tran); | ||
+ | |||
+ | if (response.ResultCode == "A") | ||
+ | { | ||
+ | MessageBox.Show(string.Concat("Transaction Approved, RefNum: ", | ||
+ | response.RefNum)); | ||
+ | } | ||
+ | else | ||
+ | { | ||
+ | MessageBox.Show(string.Concat("Transaction Failed: ", | ||
+ | response.Error)); | ||
+ | } | ||
+ | } | ||
+ | catch (Exception err) | ||
+ | { | ||
+ | MessageBox.Show(err.Message); | ||
+ | |||
+ | } | ||
</code> | </code> | ||