Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add FPX PaymentMethod Support #1794

Merged
merged 2 commits into from Sep 26, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/Stripe.net/Entities/Charges/ChargePaymentMethodDetails.cs
Expand Up @@ -32,6 +32,9 @@ public class ChargePaymentMethodDetails : StripeEntity
[JsonProperty("eps")]
public ChargePaymentMethodDetailsEps Eps { get; set; }

[JsonProperty("fpx")]
public ChargePaymentMethodDetailsFpx Fpx { get; set; }

[JsonProperty("giropay")]
public ChargePaymentMethodDetailsGiropay Giropay { get; set; }

Expand Down
@@ -0,0 +1,14 @@
namespace Stripe
{
using Newtonsoft.Json;
using Stripe.Infrastructure;

public class ChargePaymentMethodDetailsFpx : StripeEntity
{
shengwei-stripe marked this conversation as resolved.
Show resolved Hide resolved
[JsonProperty("transaction_id")]
public string TransactionId { get; set; }

[JsonProperty("bank")]
public string Bank { get; set; }
shengwei-stripe marked this conversation as resolved.
Show resolved Hide resolved
}
}
3 changes: 3 additions & 0 deletions src/Stripe.net/Entities/PaymentMethods/PaymentMethod.cs
Expand Up @@ -22,6 +22,9 @@ public class PaymentMethod : StripeEntity<PaymentMethod>, IHasId, IHasMetadata,
[JsonProperty("card_present")]
public PaymentMethodCardPresent CardPresent { get; set; }

[JsonProperty("fpx")]
public PaymentMethodFpx Fpx { get; set; }
shengwei-stripe marked this conversation as resolved.
Show resolved Hide resolved

[JsonProperty("created")]
[JsonConverter(typeof(DateTimeConverter))]
public DateTime? Created { get; set; }
Expand Down
10 changes: 10 additions & 0 deletions src/Stripe.net/Entities/PaymentMethods/PaymentMethodFpx.cs
@@ -0,0 +1,10 @@
namespace Stripe
{
using Newtonsoft.Json;

public class PaymentMethodFpx : StripeEntity
shengwei-stripe marked this conversation as resolved.
Show resolved Hide resolved
{
[JsonProperty("bank")]
public string Bank { get; set; }
}
shengwei-stripe marked this conversation as resolved.
Show resolved Hide resolved
}
Expand Up @@ -22,6 +22,9 @@ public class PaymentMethodCreateOptions : BaseOptions, IHasMetadata
[JsonProperty("card")]
public PaymentMethodCardCreateOptions Card { get; set; }

[JsonProperty("fpx")]
public PaymentMethodFpxCreateOptions Fpx { get; set; }

shengwei-stripe marked this conversation as resolved.
Show resolved Hide resolved
/// <summary>
/// The customer associated with the PaymentMethod that you are trying to share with a
/// connected account.
Expand Down
@@ -0,0 +1,13 @@
namespace Stripe
{
using Newtonsoft.Json;

public class PaymentMethodFpxCreateOptions : INestedOptions
{
/// <summary>
/// FPX bank name
/// </summary>
[JsonProperty("bank")]
public string Bank { get; set; }
shengwei-stripe marked this conversation as resolved.
Show resolved Hide resolved
}
}