11using Flurl . Http ;
2- using Flurl . Http . Configuration ;
2+ using Flurl . Http . Newtonsoft ;
33using Newtonsoft . Json ;
44using System ;
55using System . Threading ;
@@ -21,7 +21,7 @@ public async Task<QuickpayPayment> CreatePaymentAsync(QuickpayPaymentRequest dat
2121 {
2222 return await RequestAsync ( "/payments" , async ( req , ct ) => await req
2323 . WithHeader ( "Content-Type" , "application/json" )
24- . PostJsonAsync ( data , ct )
24+ . PostJsonAsync ( data , cancellationToken : ct )
2525 . ReceiveJson < QuickpayPayment > ( ) . ConfigureAwait ( false ) ,
2626 cancellationToken ) . ConfigureAwait ( false ) ;
2727 }
@@ -30,15 +30,15 @@ public async Task<PaymentLinkUrl> CreatePaymentLinkAsync(string paymentId, Quick
3030 {
3131 return await RequestAsync ( $ "/payments/{ paymentId } /link", async ( req , ct ) => await req
3232 . WithHeader ( "Content-Type" , "application/json" )
33- . PutJsonAsync ( data , ct )
33+ . PutJsonAsync ( data , cancellationToken : ct )
3434 . ReceiveJson < PaymentLinkUrl > ( ) . ConfigureAwait ( false ) ,
3535 cancellationToken ) . ConfigureAwait ( false ) ;
3636 }
3737
3838 public async Task < QuickpayPayment > GetPaymentAsync ( string paymentId , CancellationToken cancellationToken = default )
3939 {
4040 return await RequestAsync ( $ "/payments/{ paymentId } ", async ( req , ct ) => await req
41- . GetJsonAsync < QuickpayPayment > ( ct ) . ConfigureAwait ( false ) ,
41+ . GetJsonAsync < QuickpayPayment > ( cancellationToken : ct ) . ConfigureAwait ( false ) ,
4242 cancellationToken ) . ConfigureAwait ( false ) ;
4343 }
4444
@@ -47,7 +47,7 @@ public async Task<QuickpayPayment> CancelPaymentAsync(string paymentId, Cancella
4747 return await RequestAsync ( $ "/payments/{ paymentId } /cancel", async ( req , ct ) => await req
4848 . WithHeader ( "Content-Type" , "application/json" )
4949 . SetQueryParam ( "synchronized" , string . Empty )
50- . PostJsonAsync ( null , ct )
50+ . PostJsonAsync ( null , cancellationToken : ct )
5151 . ReceiveJson < QuickpayPayment > ( ) . ConfigureAwait ( false ) ,
5252 cancellationToken ) . ConfigureAwait ( false ) ;
5353 }
@@ -57,7 +57,7 @@ public async Task<QuickpayPayment> CapturePaymentAsync(string paymentId, object
5757 return await RequestAsync ( $ "/payments/{ paymentId } /capture", async ( req , ct ) => await req
5858 . WithHeader ( "Content-Type" , "application/json" )
5959 . SetQueryParam ( "synchronized" , string . Empty )
60- . PostJsonAsync ( data , ct )
60+ . PostJsonAsync ( data , cancellationToken : ct )
6161 . ReceiveJson < QuickpayPayment > ( ) . ConfigureAwait ( false ) ,
6262 cancellationToken ) . ConfigureAwait ( false ) ;
6363 }
@@ -67,7 +67,7 @@ public async Task<QuickpayPayment> RefundPaymentAsync(string paymentId, object d
6767 return await RequestAsync ( $ "/payments/{ paymentId } /refund", async ( req , ct ) => await req
6868 . WithHeader ( "Content-Type" , "application/json" )
6969 . SetQueryParam ( "synchronized" , string . Empty )
70- . PostJsonAsync ( data , ct )
70+ . PostJsonAsync ( data , cancellationToken : ct )
7171 . ReceiveJson < QuickpayPayment > ( ) . ConfigureAwait ( false ) ,
7272 cancellationToken ) . ConfigureAwait ( false ) ;
7373 }
@@ -79,7 +79,7 @@ private async Task<TResult> RequestAsync<TResult>(string url, Func<IFlurlRequest
7979 try
8080 {
8181 var req = new FlurlRequest ( _config . BaseUrl + url )
82- . ConfigureRequest ( x =>
82+ . WithSettings ( x =>
8383 {
8484 var jsonSettings = new JsonSerializerSettings
8585 {
0 commit comments