public void Should_Refund() { CreateRefundRequest request = new CreateRefundRequest(); request.ConversationId = "123456789"; request.Locale = Locale.TR.ToString(); request.PaymentTransactionId = "1"; request.Price = "0.5"; request.Ip = "85.34.78.112"; request.Currency = Currency.TRY.ToString(); Refund refund = Refund.Create(request, options); PrintResponse<Refund>(refund); Assert.AreEqual(Status.SUCCESS.ToString(), refund.Status); Assert.AreEqual(Locale.TR.ToString(), refund.Locale); Assert.AreEqual("123456789", refund.ConversationId); Assert.IsNotNull(refund.SystemTime); Assert.IsNull(refund.ErrorCode); Assert.IsNull(refund.ErrorMessage); Assert.IsNull(refund.ErrorGroup); }
public static RefundChargedFromMerchant Create(CreateRefundRequest request, Options options) { return RestHttpClient.Create().Post<RefundChargedFromMerchant>(options.BaseUrl + "/payment/iyzipos/refund/merchant/charge", GetHttpHeaders(request, options), request); }
public static Refund Create(CreateRefundRequest request, Options options) { return RestHttpClient.Create().Post<Refund>(options.BaseUrl + "/payment/refund", GetHttpHeaders(request, options), request); }