OAR-PS2000 Data
In some cases, it may be required to send Original Authorization Response (OAR) Data and Payment Service 2000 (PS2000) Data to process a secondary transaction. You will receive the OAR and PS2000 Data as part of the primary transaction result. You can store this data and then send it as part of the secondary transaction request.
Secondary transactions include:
- Linked Refund
- Pre-Auth Complete
- Pre-Auth Delete
- Void
- Card On File (Token) Transactions
Code Samples
CWS
First you will want to save the OAR and PS2000 Data received in the primary transaction response (e.g. sale or pre-auth).
Response (Primary Transaction)
{
"requestId": "1578283620",
"statusDetails": "REQUEST_ACCEPTED",
"data": {
"paymentGatewayCommand": {
"completed": true,
"eventQueue": [{
"timeStamp": "1629826150444",
"statusDetails": "TRANSACTION_COMPLETED"
} ],
"chanId": "498e8098-51fa-4c5c-bb11-26147f959b9c",
"paymentTransactionData" : {
"result" : "APPROVED",
"oarData" : "110001658808241729080000000000000000000000307930030000016691",
"ps2000Data" : "A824132909881855",
.....
}
}
}
}
Now you can send the OAR and PS2000 Data when performing any secondary transaction associated with the primary transaction.
Request (Secondary Transaction)
{
"method": "startPaymentTransaction",
"requestId": "1578283621",
"targetType": "paymentGatewayConverge",
"version": "1.0",
"parameters": {
"paymentGatewayId" : "d5b9ea11-a9a7-4888-8458-2f609656579f",
"transactionType" : "LINKED_REFUND",
"tenderType" : "CARD",
"oarData" : "110001658808241729080000000000000000000000307930030000016691",
"ps2000Data" : "A824132909881855",
.....
}
}
Java
// Save OAR and PS2000 Data from transaction outcome of primary transaction (e.g. sale or pre-auth)
public void transactionDidComplete(ECLTransactionInterface transaction, ECLTenderInterface tender, ECLTransactionOutcome outcome) {
if (outcome instanceof ECLCardTransactionOutcome) {
ECLCardTransactionOutcome cardOutcome = (ECLCardTransactionOutcome) outcome;
String oarData = cardOutcome.getOriginalAuthorizationResponseData();
String ps2000Data = cardOutcome.getPs2000Data();
}
}
// Card tender interface that will be used for the secondary transaction
ECLCardTenderInterface cardTender;
cardTender.setOriginalAuthorizationResponseData(oarData);
cardTender.setPs2000Data(ps2000Data);
Objective-C (iOS)
// Save OAR and PS2000 Data from transaction outcome of primary transaction (e.g. sale or pre-auth)
- (void)transactionDidComplete:(id<ECLTransactionProtocol>)transaction using:(id<ECLTenderProtocol>)tender outcome:(ECLTransactionOutcome *)outcome {
if ([outcome isKindOfClass:[ECLCardTransactionOutcome class]]) {
ECLCardTransactionOutcome *cardOutcome = (ECLCardTransactionOutcome *)outcome;
NSString *oarData = cardOutcome.originalAuthorizationResponseData;
NSString *ps2000Data = cardOutcome.ps2000Data;
}
}
// Card tender protocol that will be used for the secondary transaction
id<ECLCardTenderProtocol> cardTender;
[cardTender setOriginalAuthorizationResponseData:oarData];
[cardTender setPs2000Data:ps2000Data];
C#
// Save OAR and PS2000 Data from the MyPaymentComplete of the primary transaction (e.g. sale or pre-auth)
public void MyPaymentComplete(PaymentTransactionResults paymentResults) {
PaymentTransactionData paymentData = paymentResults.PaymentTransactionData;
string oarData = paymentData.oarData;
string ps2000Data = paymentData.ps2000Data;
}
// PaymentArgs that will be used for the secondary transaction
PaymentArgs paymentArgs = new PaymentArgs();
paymentArgs.oarData = oarData;
paymentArgs.ps2000Data = ps2000Data;