Class CreditTransaction
Reference credit transaction can be performed on successful transactions in order to credit the amount. Therefore, a reference credit transaction takes the PNRef of a previous transaction.
...............// Populate data objects
...............
// Create a new Credit Transaction.
// Following is an example of a reference credit type of transaction.
CreditTransaction Trans = new CreditTransaction("PNRef of a previous
// transaction.",
User, Connection, Inv, PayflowUtility.getRequestId());
// 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() %3E 0)
{
System.out.println("Errors = " + ctx.toString());
}
-
Field Summary
Fields inherited from class paypal.payflow.BaseTransaction
requestId -
Constructor Summary
ConstructorsConstructorDescriptionCreditTransaction(String origId, UserInfo userInfo, String requestId) Constructor.CreditTransaction(String origId, UserInfo userInfo, Invoice invoice, String requestId) Constructor.CreditTransaction(String origId, UserInfo userInfo, Invoice invoice, BaseTender tender, String requestId) Constructor.CreditTransaction(String origId, UserInfo userInfo, PayflowConnectionData PayflowConnectionData, String requestId) Constructor.CreditTransaction(String origId, UserInfo userInfo, PayflowConnectionData payflowConnectionData, Invoice invoice, String requestId) Constructor.CreditTransaction(String origId, UserInfo userInfo, PayflowConnectionData payflowConnectionData, Invoice invoice, BaseTender tender, String requestId) Constructor.CreditTransaction(UserInfo userInfo, Invoice invoice, BaseTender tender, String requestId) Constructor.CreditTransaction(UserInfo userInfo, PayflowConnectionData PayflowConnectionData, Invoice invoice, BaseTender tender, String requestId) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidGenerates the transaction request.gets the OrigPPRefvoidsetOrigPPRef(String origPPRef) sets the OrigPPRefMethods 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
-
CreditTransaction
public CreditTransaction(String origId, UserInfo userInfo, PayflowConnectionData payflowConnectionData, Invoice invoice, String requestId) Constructor.- Parameters:
origId- Original Transaction Id.userInfo- User Info object populated with user credentials.payflowConnectionData- Connection credentials object.invoice- Invoice object.requestId- Request Id.Reference credit transaction can be performed on successful. transactions in order to credit the amount. Therefore, a reference credit transaction takes the PNRef of a previous // transaction.
...............
// Populate data objects
...............
// Create a new Credit Transaction.
// Following is an example of a reference credit type of
// transaction.
CreditTransaction trans = new CreditTransaction("PNRef of a
// previous transaction.",
User, Connection, Inv, PayflowUtility.getRequestId());
// 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.Result);
System.out.println("PNREF = " + TrxnResponse.Pnref);
System.out.println("RESPMSG = " + TrxnResponse.RespMsg);
}
}
// Get the Context and check for any contained SDK specific errors.
Context ctx = resp.getTransactionContext();
if (ctx != null && ctx.getErrorCount() %3E 0)
{
System.out.println("Errors = " + ctx.ToString());
}
-
CreditTransaction
Constructor.- Parameters:
origId- Original Transaction Id.userInfo- UserInfo object populated with user credentials.invoice- Invoice object.requestId- Request Id.Reference credit transaction can be performed on successful transactions in order to credit the amount. Therefore, a reference credit transaction takes the PNRef of a previous transaction.
...............
// Populate data objects
...............
// Create a new Credit Transaction.
// Following is an example of a reference credit type of
// transaction.
CreditTransaction trans = new CreditTransaction("PNRef of a
// previous transaction.",
User, Inv, PayflowUtility.getRequestId());
// 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() %3E 0)
{
System.out.println("Errors = " + ctx.toString());
}
-
CreditTransaction
public CreditTransaction(String origId, UserInfo userInfo, PayflowConnectionData payflowConnectionData, Invoice invoice, BaseTender tender, String requestId) Constructor.- Parameters:
origId- Original Transaction Id.userInfo- UserInfo object populated with user credentials.payflowConnectionData- Connection credentials object.invoice- Invoice object.tender- tender object.requestId- Request Id.Reference credit transaction can be performed on successful transactions in order to credit the amount. Therefore, a reference credit transaction takes the PNRef of a previous transaction.
...............
// Populate data objects
...............
// Create a new Credit Transaction.
// Following is an example of a reference credit type of
transaction.
CreditTransaction trans = new CreditTransaction("PNRef of a
previous transaction.",
User, Connection, Inv, tender, PayflowUtility.getRequestId());
// 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() %3E 0)
{
System.out.println("Errors = " + ctx.toString());
}
-
CreditTransaction
public CreditTransaction(String origId, UserInfo userInfo, Invoice invoice, BaseTender tender, String requestId) Constructor.- Parameters:
origId- Original Transaction IduserInfo- UserInfo object populated with user credentials.invoice- Invoice object.tender- tender object.requestId- Request Id.Reference credit transaction can be performed on successful transactions in order to credit the amount. Therefore, a reference credit transaction takes the PNRef of a previous transaction.
...............
// Populate data objects
...............
// Create a new Credit Transaction.
// Following is an example of a reference credit type of
// transaction.
CreditTransaction trans = new CreditTransaction("PNRef of a
// previous transaction.",
User, Inv, tender, PayflowUtility.getRequestId());
// 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.TransactionContext;
if (ctx != null &&ctx.getErrorCount() %3E 0)
{
System.out.println("Errors = " + ctx.ToString());
}
-
CreditTransaction
public CreditTransaction(String origId, UserInfo userInfo, PayflowConnectionData PayflowConnectionData, String requestId) Constructor.- Parameters:
origId- Original Transaction IduserInfo- User Info object populated with user credentials.PayflowConnectionData- Connection credentials object.requestId- Request Id.Reference credit transaction can be performed on // successful transactions in order to credit the amount. Therefore, a reference credit transaction takes the PNRef of a previous // transaction.
...............
// Populate data objects
...............
// Create a new Credit Transaction.
// Following is an example of a reference credit type of
// transaction.
CreditTransaction Trans = new CreditTransaction("PNRef of a
// previous transaction.",
User, Connection, PayflowUtility.getRequestId());
// 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() %3E 0)
{
System.out.println("Errors = " + ctx.ToString());
}
-
CreditTransaction
Constructor.- Parameters:
origId- Original Transaction IduserInfo- User Info object populated with user credentials.requestId- Request IdReference credit transaction can be performed on successful transactions in order to credit the amount. Therefore, a reference credit transaction takes the PNRef of a previous transaction.
...............
// Populate data objects
...............
// Create a new Credit Transaction.
// Following is an example of a reference credit type of
// transaction.
CreditTransaction Trans = new CreditTransaction("PNRef of a
// previous transaction.", PayflowUtility.requestId);
// Submit the transaction.
Response Resp = Trans.SubmitTransaction();
if (Resp != null)
{
// Get the Transaction Response parameters.
TransactionResponse TrxnResponse = Resp.TransactionResponse;
if (TrxnResponse != null)
{
System.out.println("RESULT = " + TrxnResponse.Result);
System.out.println("PNREF = " + TrxnResponse.Pnref);
System.out.println("RESPMSG = " + TrxnResponse.RespMsg);
}
}
// Get the Context and check for any contained SDK specific errors.
Context Ctx = Resp.TransactionContext;
if (ctx != null && ctx.getErrorCount() %3E 0)
{
System.out.println("Errors = " + ctx.ToString());
}
-
CreditTransaction
public CreditTransaction(UserInfo userInfo, PayflowConnectionData PayflowConnectionData, Invoice invoice, BaseTender tender, String requestId) Constructor.- Parameters:
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.This class is used for a stand alone credit transaction.
...............
// Populate data objects
...............
// Create a new Credit Transaction.
// Following is an example of a stand alone credit type of
// transaction.
CreditTransaction Trans = new CreditTransaction(User, Inv,
// Connection,
tender, PayflowUtility.requestId);
// Submit the transaction.
Response Resp = Trans.SubmitTransaction();
if (Resp != null)
{
// Get the Transaction Response parameters.
TransactionResponse TrxnResponse = Resp.TransactionResponse;
if (TrxnResponse != null)
{
System.out.println("RESULT = " + TrxnResponse.Result);
System.out.println("PNREF = " + TrxnResponse.Pnref);
System.out.println("RESPMSG = " + TrxnResponse.RespMsg);
}
}
// Get the Context and check for any contained SDK specific errors.
Context Ctx = Resp.TransactionContext;
if (ctx != null && ctx.getErrorCount() %3E 0)
{
Console.WriteLine(Environment.NewLine + "Errors = " +
// Ctx.ToString());
}
-
CreditTransaction
Constructor.- Parameters:
userInfo- User Info object populated with user credentials.invoice- Invoice object.tender- tender object such as Card tender.requestId- Request Id.This class is used for a stand alone credit transaction.
...............
// Populate data objects
...............
// Create a new Credit Transaction.
// Following is an example of a stand alone type of transaction.
CreditTransaction trans = new CreditTransaction(User, Inv,
tender, PayflowUtility.getRequestId());
// Submit the transaction.
Response resp = trans.submitTransaction();
if (resp != null)
{
// Get the Transaction Response parameters.
TransactionResponse trxnResponse = resp.TransactionResponse;
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() %3E 0)
{
System.out.println("Errors = " + ctx.ToString());
}
*
-
-
Method Details
-
getOrigPPRef
gets the OrigPPRef- Returns:
- origPPRef
maps to PayflowParameter ORIGPPREF
-
setOrigPPRef
sets the OrigPPRef- Parameters:
origPPRef- Stringmaps to PayflowParameter ORIGPPREF
-
generateRequest
protected void generateRequest()Generates the transaction request.- Overrides:
generateRequestin classBaseTransaction
-