private void ProcessIssuerResponse(PosResponseVer10 response, ItemChoiceType1 expectedType, decimal?amount) { int transactionId = response.Header.GatewayTxnId; if (!(response.Transaction.Item is AuthRspStatusType)) { return; } var transaction = (AuthRspStatusType)response.Transaction.Item; if (transaction.RspCode == "91") { try { //this.Reverse(amount).Execute(); } catch (HpsGatewayException e) { if (e.Details.GatewayResponseCode == 3) { HpsIssuerResponseValidation.CheckResponse(transactionId, transaction.RspCode, transaction.RspText); } throw new HpsCreditException(transactionId, HpsExceptionCodes.IssuerTimeoutReversalError, "Error occurred while reversing a charge due to an issuer timeout.", e); } catch (HpsException e) { throw new HpsCreditException(transactionId, HpsExceptionCodes.IssuerTimeoutReversalError, "Error occurred while reversing a charge due to an issuer timeout.", e); } } HpsIssuerResponseValidation.CheckResponse(transactionId, transaction.RspCode, transaction.RspText); }
private void ProcessGatewayResponse(PosResponseVer10 response, ItemChoiceType1 expectedResponseType, decimal? amount) { var responseCode = response.Header.GatewayRspCode; var transactionId = response.Header.GatewayTxnId; if (responseCode == 0) return; if (responseCode == 30) { try { //Reverse(amount).WithTransactionId(transactionId).Execute(); } catch (HpsException e) { throw new HpsGatewayException(HpsExceptionCodes.GatewayTimeoutReversalError, "Error occurred while reversing a charge due to a gateway timeout.", e); } } HpsGatewayResponseValidation.CheckResponse(response, (ItemChoiceType2)expectedResponseType); }
private void ProcessGatewayResponse(PosResponseVer10 response, ItemChoiceType1 expectedResponseType, decimal?amount) { var responseCode = response.Header.GatewayRspCode; var transactionId = response.Header.GatewayTxnId; if (responseCode == 0) { return; } if (responseCode == 30) { try { //Reverse(amount).WithTransactionId(transactionId).Execute(); } catch (HpsException e) { throw new HpsGatewayException(HpsExceptionCodes.GatewayTimeoutReversalError, "Error occurred while reversing a charge due to a gateway timeout.", e); } } HpsGatewayResponseValidation.CheckResponse(response, (ItemChoiceType2)expectedResponseType); }
private void ProcessIssuerResponse(PosResponseVer10 response, ItemChoiceType1 expectedType, decimal? amount) { int transactionId = response.Header.GatewayTxnId; if (!(response.Transaction.Item is AuthRspStatusType)) return; var transaction = (AuthRspStatusType)response.Transaction.Item; if (transaction.RspCode == "91") { try { //this.Reverse(amount).Execute(); } catch (HpsGatewayException e) { if (e.Details.GatewayResponseCode == 3) HpsIssuerResponseValidation.CheckResponse(transactionId, transaction.RspCode, transaction.RspText); throw new HpsCreditException(transactionId, HpsExceptionCodes.IssuerTimeoutReversalError, "Error occurred while reversing a charge due to an issuer timeout.", e); } catch (HpsException e) { throw new HpsCreditException(transactionId, HpsExceptionCodes.IssuerTimeoutReversalError, "Error occurred while reversing a charge due to an issuer timeout.", e); } } HpsIssuerResponseValidation.CheckResponse(transactionId, transaction.RspCode, transaction.RspText); }
public FeeLookupData FeeLookupForBpEp(string fromLocation, string toCountry, string toState, string sendCurr, AmountRange amtRange, ItemChoiceType1 itemChoiceType, string receiveCode, string receiveAgentId, string agentId, string agentPos) { var feeLookupData = new FeeLookupData(); var feeLookupReq = FeeLookupRequestFactory.FeeLookupForBpEp(toCountry, toState, sendCurr, amtRange, itemChoiceType, receiveCode, receiveAgentId, agentId, agentPos); feeLookupData.Set(feeLookupReq); feeLookupData.Set(_acIntegration.FeeLookup(feeLookupData.FeeLookupReq)); return(feeLookupData); }
private static FeeLookupRequest GenerateBaseFeeLookupRequest(string toCountry, string toState, string sendCurr, AmountRange amtRange, double amount, ItemChoiceType1 itemChoiceType) { return(new FeeLookupRequest { DefaultMaxFee = false, AllOptions = true, DestinationCountry = toCountry, DestinationCountrySubdivisionCode = toState, SendCurrency = sendCurr, Item = amtRange == AmountRange.CustomAmount ? (decimal)amount : GenerateAmount(amtRange), ItemElementName = itemChoiceType, }); }
public static FeeLookupRequest FeeLookupForBpEp(string toCountry, string toState, string sendCurr, AmountRange amtRange, ItemChoiceType1 itemChoiceType, string receiveCode, string receiveAgentId, string agentId, string agentPos) { var feeLookupRequest = GenerateBaseFeeLookupRequest(toCountry, toState, sendCurr, amtRange, 0.0 /*custom amount currently unsupported for Bill Pay*/, itemChoiceType); feeLookupRequest.MgiSessionType = SessionType.BP; feeLookupRequest.ProductVariant = ProductVariantType.EP; feeLookupRequest.ReceiveCode = receiveCode; feeLookupRequest.ReceiveAgentID = receiveAgentId; feeLookupRequest.AgentID = agentId; feeLookupRequest.AgentSequence = agentPos; return(feeLookupRequest); }