public async Task <PaymentResponse> PaymentDetails(string merchantId, string merchantReferenceNumber)
        {
            var request = RequestMapper.MapDetailsRequest(merchantId, merchantReferenceNumber, clock);
            var result  = await gateway.HandleDetailsRequest(request);

            return(ResponseMapper.MapResponse(result));
        }
        public void MappingDetails_WhenInputCorrect()
        {
            var merchantId  = "merchantId";
            var merchantRef = "merchantRef";
            var timeStamp   = DateTimeOffset.UtcNow;

            clock.Setup(c => c.GetCurrentUtcTimestamp()).Returns(timeStamp);

            var response = RequestMapper.MapDetailsRequest(merchantId, merchantRef, clock.Object);

            Check.That(response).IsNotNull();
            Check.That(response.MerchantId).Equals(merchantId);
            Check.That(response.MerchantReferenceNumber).Equals(merchantRef);
            Check.That(response.TimeStamp).Equals(timeStamp);
        }
 public void MappingDetails_WhenMissingInput_ShouldThrowBadArgument(string merchantId, string merchantRef)
 {
     Check.ThatCode(() => RequestMapper.MapDetailsRequest(merchantId, merchantRef, clock.Object))
     .Throws <ArgumentException>();
 }