-
Notifications
You must be signed in to change notification settings - Fork 19
Null reference on invalid culture #83
Copy link
Copy link
Open
Description
was trying out the sdk with this test case:
var b = new SdkClient(() => new ConsoleLogger());
var request = b.CreateRequest().Authenticate(key, secret, false, culture: System.Globalization.CultureInfo.CurrentCulture)
.TransactionRequest()
.SetBasicFields(new BuckarooSdk.DataTypes.RequestBases.TransactionBase()
{
AmountDebit = 10,
Currency = "EUR",
Invoice = "testinvoice 123",
ReturnUrl = "http://wwww.google.com"
});
ConfiguredServiceTransaction? transaction = paymentMethod switch
{
ServiceNames.Sofort => request.Sofort().Pay(request: new BuckarooSdk.Services.Sofort.SofortPayRequest()),
ServiceNames.Ideal => request.Ideal().Pay(new BuckarooSdk.Services.Ideal.TransactionRequest.IdealPayRequest()),
ServiceNames.PayPal => request.PayPal().Pay(new BuckarooSdk.Services.PayPal.PayPalPayRequest() { ProductName = "name", BillingAgreementDescription = "", BuyerEmail = "", PageStyle = "" }),
_ => throw new Exception(""),
};
var response = transaction?.Execute();
this returned for me a 400: Culture header could not be parsed. The provided value is not a known culture.
but the sdk does not give that response. instead it will give a null reference exception on line 47 of ConfiguredServiceTransaction.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels