Class SagePayUtil
java.lang.Object
org.apache.ofbiz.accounting.thirdparty.sagepay.SagePayUtil
-
Method Summary
Modifier and TypeMethodDescriptionbuildCardAuthorisationPaymentResponse
(Boolean authResult, String authCode, String authFlag, BigDecimal processAmount, String authRefNum, String authAltRefNum, String authMessage) buildCardCapturePaymentResponse
(Boolean captureResult, String captureCode, String captureFlag, BigDecimal captureAmount, String captureRefNum, String captureAltRefNum, String captureMessage) buildCardRefundPaymentResponse
(Boolean refundResult, String refundCode, BigDecimal refundAmount, String refundRefNum, String refundAltRefNum, String refundMessage) buildCardReleasePaymentResponse
(Boolean releaseResult, String releaseCode, BigDecimal releaseAmount, String releaseRefNum, String releaseAltRefNum, String releaseMessage) buildCardVoidPaymentResponse
(Boolean refundResult, BigDecimal refundAmount, String refundRefNum, String refundAltRefNum, String refundMessage) static org.apache.http.HttpHost
static org.apache.http.HttpHost
Builds HttpHost with the given SagePayProperties.static org.apache.http.impl.client.CloseableHttpClient
static org.apache.http.client.methods.HttpPost
getHttpPost
(String uri, Map<String, String> parameters) getResponseData
(org.apache.http.HttpResponse response)
-
Method Details
-
buildCardAuthorisationPaymentResponse
-
buildCardCapturePaymentResponse
-
buildCardReleasePaymentResponse
-
buildCardVoidPaymentResponse
-
buildCardRefundPaymentResponse
-
getHost
Builds HttpHost with the given SagePayProperties.- Parameters:
props
- SagePay properties- Returns:
- Throws:
IllegalArgumentException
- if neither productionHost nor testingHost found in properties.
-
getHost
-
getResponseData
public static Map<String,String> getResponseData(org.apache.http.HttpResponse response) throws IOException - Throws:
IOException
-
getHttpPost
public static org.apache.http.client.methods.HttpPost getHttpPost(String uri, Map<String, String> parameters) throws UnsupportedEncodingException- Throws:
UnsupportedEncodingException
-
getHttpClient
public static org.apache.http.impl.client.CloseableHttpClient getHttpClient()
-