public ModificationResult CancelOrRefund(CancelOrRefundRequest request)
        {
            var jsonRequest = Util.JsonOperation.SerializeRequest(request);
            var jsonResult  = _cancelOrRefund.Request(jsonRequest);

            return(Util.JsonOperation.Deserialize <ModificationResult>(jsonResult));
        }
Beispiel #2
0
        public async Task <ModificationResult> CancelOrRefundAsync(CancelOrRefundRequest request, RequestOptions requestOptions = null)
        {
            var jsonRequest = Util.JsonOperation.SerializeRequest(request);
            var jsonResult  = await _cancelOrRefund.RequestAsync(jsonRequest, requestOptions);

            return(Util.JsonOperation.Deserialize <ModificationResult>(jsonResult));
        }
        protected CancelOrRefundRequest CreateCancelOrRefundTestRequest(string pspReference)
        {
            var cancelOrRefundRequest = new CancelOrRefundRequest()
            {
                MerchantAccount   = "MerchantAccount",
                Reference         = "cancelOrRefund - " + DateTime.Now.ToString("yyyyMMdd"),
                OriginalReference = pspReference
            };

            return(cancelOrRefundRequest);
        }