Skip to content

Commit

Permalink
Update payment request with partial authorization (#398)
Browse files Browse the repository at this point in the history
  • Loading branch information
armando-rodriguez-cko authored May 27, 2024
1 parent 808c043 commit 0d8442e
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
7 changes: 7 additions & 0 deletions src/CheckoutSdk/Payments/PartialAuthorization.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
namespace Checkout.Payments
{
public class PartialAuthorization
{
public bool Enabled { get; set; }
}
}
2 changes: 2 additions & 0 deletions src/CheckoutSdk/Payments/Request/PaymentRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ public class PaymentRequest

public AuthorizationType? AuthorizationType { get; set; }

public PartialAuthorization PartialAuthorization { get; set; }

public bool? Capture { get; set; }

public DateTime? CaptureOn { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,11 @@ private async Task<PaymentResponse> MakeAuthorizationEstimatedPayment()
Amount = 10L,
Currency = Currency.USD,
Sender = paymentIndividualSender,
AuthorizationType = AuthorizationType.Estimated
AuthorizationType = AuthorizationType.Estimated,
PartialAuthorization = new PartialAuthorization
{
Enabled = true
}
};

var paymentResponse = await DefaultApi.PaymentsClient().RequestPayment(paymentRequest);
Expand Down

0 comments on commit 0d8442e

Please sign in to comment.