Stripe.StripeException: 'Адрес клиента недействителен. Для платежей, не связанных с INR, необходимо указать имя и адрес за пределами Индии. net core 3.0, а платеж клиенту в полосе. Ошибка в строке
Charge charge = chargeService.Create(chargeOptions);
Ниже приведен код:
public ResponseModel StripeCreateCustomer()
{
ResponseModel res = new ResponseModel();
StripeConfiguration.ApiKey = _paymentSettings.Value.SecretKey;
// Create a Customer:
var customerOptions = new CustomerCreateOptions
{
Source = "tok_mastercard",//SourceToken
Email = "BillReleford@example.com",
Name = "JOHN2 SMITH",
};
var customerService = new CustomerService();
Customer customer = customerService.Create(customerOptions);
// Charge the Customer instead of the card
var chargeOptions = new ChargeCreateOptions
{
Amount = 1000,
Currency = "usd",
Customer = customer.Id,
Description = "Testing Payment",
};
var chargeService = new ChargeService();
Charge charge = chargeService.Create(chargeOptions);
res.Message = charge.Status;
res = returnResultModel(res.Message, (int)HttpStatusCode.OK, true, 0, string.Empty);
return res;
}