Package paypal.payflow
Class VoiceAuthTransaction
java.lang.Object
paypal.payflow.BaseTransaction
paypal.payflow.VoiceAuthTransaction
This class is used to perform a voice authorization transaction.
Some transactions cannot be authorized over the Internet (for example, high dollar
amounts)'processing networks generate Referral (Result Code 13) transactions.
In these situations, contact the customer service department of the
merchant bank and provide the payment information as requested.
If the transaction is approved, the bank provides a voice authorization
code (AUTHCODE) for the transaction. This must be included as AUTHCODE
as part of a Voice Authorization transaction.
...............
// Populate data objects
...............
// Create a new Voice Auth Transaction.
VoiceAuthTransaction trans = new VoiceAuthTransaction("123PNI",
user, connection, inv, card, PayflowUtility.RequestId);
// Submit the transaction.
Response resp = trans.submitTransaction();
if (resp != null)
{
// Get the Transaction Response parameters.
TransactionResponse trxnResponse = resp.getTransactionResponse();
if (trxnResponse != null)
{
System.out.println("RESULT = " + trxnResponse.getResult());
System.out.println("PNREF = " + trxnResponse.getPnref());
System.out.println("RESPMSG = " + trxnResponse.getRespMsg());
}
}
// Get the Context and check for any contained SDK specific errors.
Context ctx = resp.getTransactionContext();
if (ctx != null & ctx.getErrorCount() > 0)
{
System.out.println("Errors = " + ctx.toString());
}
-
Field Summary
Fields inherited from class paypal.payflow.BaseTransaction
requestId -
Constructor Summary
ConstructorsConstructorDescriptionVoiceAuthTransaction(String AuthCode, String AuthDate, UserInfo UserInfo, PayflowConnectionData PayflowConnectionData, Invoice Invoice, BaseTender Tender, String RequestId) ConstructorVoiceAuthTransaction(String AuthCode, UserInfo UserInfo, Invoice Invoice, BaseTender Tender, String RequestId) ConstructorVoiceAuthTransaction(String AuthCode, UserInfo UserInfo, PayflowConnectionData PayflowConnectionData, Invoice Invoice, BaseTender Tender, String RequestId) Constructor -
Method Summary
Modifier and TypeMethodDescriptionprotected voidGenerates the transaction request.Methods inherited from class paypal.payflow.BaseTransaction
addHeader, clearExtendData, getBuyerAuthStatus, getClientInfo, getContext, getExtData, getRequest, getRequestBuffer, getRequestId, getResponse, getTender, getTrxType, getVerbosity, RemoveTransHeader, setBuyerAuthStatus, setClientInfo, setContext, setExtData, setRequestId, setTender, setVerbosity, submitTransaction
-
Constructor Details
-
VoiceAuthTransaction
public VoiceAuthTransaction(String AuthCode, UserInfo UserInfo, PayflowConnectionData PayflowConnectionData, Invoice Invoice, BaseTender Tender, String RequestId) Constructor- Parameters:
AuthCode- - Required for Voice Authorization.UserInfo- - User Info object populated with user credentials.PayflowConnectionData- - Connection credentials object.Invoice- - Invoice Object.Tender- - Tender object such as Card Tender.RequestId- - Request Id ............... // Populate data objects ............... *// Create a new Void Transaction. VoiceAuthTransaction trans = new VoidTransaction("123PNI", user, connection, inv, tender, payflowUtility.getRequestId());
-
VoiceAuthTransaction
public VoiceAuthTransaction(String AuthCode, String AuthDate, UserInfo UserInfo, PayflowConnectionData PayflowConnectionData, Invoice Invoice, BaseTender Tender, String RequestId) Constructor- Parameters:
AuthCode- - Authorization code obtain via another means; i.e. phone.AuthDate- - Date the AuthCode was obtained.UserInfo- - User Info object populated with user credentials.PayflowConnectionData- - Connection credentials object.Invoice- - Invoice Object.Tender- - Tender object such as Card Tender.RequestId- - Request Id ............... // Populate data objects ............... // Create a new Void Transaction. VoiceAuthTransaction trans = new VoidTransaction("123PNI", "082120", user, connection, inv, tender, payflowUtility.getRequestId());
-
VoiceAuthTransaction
public VoiceAuthTransaction(String AuthCode, UserInfo UserInfo, Invoice Invoice, BaseTender Tender, String RequestId) Constructor- Parameters:
AuthCode- - mandatory for Voice auth transaction.UserInfo- - User Info object populated with user credentials.Invoice- - Invoice Object.Tender- - Tender object such as Card Tender.RequestId- - Request Id ............... // Populate data objects ............... // Create a new Void Transaction. VoiceAuthTransaction trans = new VoidTransaction("123PNI", user, inv, tender, payflowUtility.getRequestId());
-
-
Method Details
-
generateRequest
protected void generateRequest()Description copied from class:BaseTransactionGenerates the transaction request.- Overrides:
generateRequestin classBaseTransaction
-