====== runQuickCredit ====== Run a credit based on the credit card details of a previous transaction. ===== Description ===== This method allows you to run a new transaction using stored customer data. Simply pass the reference number (RefNum) of a previous transaction and the gateway will automatically transfer the credit card information for use in the new transaction. Some credit card information, such as the card code and magnetic strip cannot be stored. This may cause the new transaction to come in at a higher rate than the original. See also [[runTransaction]], [[runSale]], [[voidTransaction]], [[runCredit]], [[runAuthOnly]] ===== Syntax ===== [[..:objects:TransactionResponse]] **runQuickCredit** ( [[..:objects:ueSecurityToken]] Token, integer RefNum, [[..:objects:TransactionDetail]] Details ) ===== Arguments ===== ^Type ^Name ^Description ^ |[[..:objects:ueSecurityToken]] |Token |Merchant security token: used to identify merchant and validate transaction.| |integer |RefNum |Unique transaction reference number assigned by the gateway.| |[[..:objects:TransactionDetail]] |Details |Request transaction details, including transaction amount, invoice number, customer ID, PO number, and other transaction specific data.| ===== Return Value ===== |[[..:objects:TransactionResponse]] |Returns a TransactionResponse object containing the results of the transaction and all relevant data. | ===== Examples ===== ==== PHP ==== For directions on how to set up the WSDL link, create "$token" and "$client", go to [[..:howto:php|SOAP PHP How-to]]. 4.00, "Invoice"=>1234, "Description"=>"Test Transaction", "PONum"=>"", "OrderID"=>1234, "Tax"=>0, "Tip"=>0, "NonTax"=>false, "Shipping"=>0, "Discount"=>0, "Subtotal"=>4.00 ); print_r($client->runQuickCredit($token,$refnum, $details)); } catch(SoapFault $e) { echo $e->getMessage(); echo "\n\nRequest: " . $client->__getLastRequest(); echo "\n\nResponse: " . $client->__getLastResponse(); } ?> ==== Java ==== This example uses the [[developer/javalibrary|USAePay Java library]]. For directions on how to install the library and create the token/client objects, go to either the [[..:howto:javajaxrpc|Java JAX-RPC Howto]] or the [[..:howto:javajaxws|Java JAX-WS Howto]]. try { //Set RefNum to the transaction refference number //you want to run a quick credit on BigInteger RefNum = new BigInteger("123456789"); //populate transaction details TransactionDetail details = new TransactionDetail(); details.setAmount(22.34); details.setDescription("QuickCredit"); details.setInvoice("119891"); // Create response object TransactionResponse response; response = client.runQuickCredit(token, RefNum, details, false); System.out.println("Response: " + response.getResult()); System.out.println("RefNum: " + response.getRefNum()); } catch (Exception e) { System.out.println("Soap Exception: " + e.getMessage()); } ==== VB ==== Dim client As usaepay.usaepayService = New usaepay.usaepayService Dim token As usaepay.ueSecurityToken token = Me.CreateToken("982lz9VsLm87MA54Sv8E582h8OZMArL6", "443311") Dim refnum As Integer Dim details As usaepay.TransactionDetail = New usaepay.TransactionDetail refnum = "46352757" details.Amount = "34.50" details.AmountSpecified = True details.Description = "Example QuickCredit" details.Invoice = "123456" Dim response As usaepay.TransactionResponse response = client.runQuickCredit(token, refnum, details, authonly) If response.ResultCode = "A" Then MsgBox("Transaction Approved, Reference Number: " & response.RefNum) ElseIf response.ResultCode = "D" Then MsgBox("Transaction Declined, Reason: " & response.Error) Else MsgBox("Transaction Error, Reason: " & response.Error) End If ==== XML ==== 192.168.0.1 fb8305331a09c4f1002971c5974987ddb0dbba0f 1193442685704132440 sha1 HB4P7C4K2w2ZCQQQXRqrxDj6agrS2NIT 1118268
29 John Doe 0 Example Transaction 1 44539 12345 54321 2 16 1
4 15 8
===== Change History ===== ^ Version ^ Change ^ | 1.0 | Method added in soap v1.0 |