Add Stripe support for New Zealand

This commit is contained in:
Jenni Nurmi 2018-12-05 14:45:35 +02:00
parent 45e00d2241
commit c79fb7e141
3 changed files with 18 additions and 0 deletions

View file

@ -156,6 +156,10 @@ export const mapInputsToStripeAccountKeys = (country, values) => {
case 'ES':
case 'SE':
return { account_number: cleanedString(values[IBAN]) };
case 'NZ':
// NZ account number is typically presented in the format xx-xxxx-xxxxxxx-xxx
// '-' separators must be removed before sending value to Stripe API
return { account_number: cleanedString(values[ACCOUNT_NUMBER]).replace(/-/g, '') };
case 'AU':
return {
routing_number: cleanedString(values[BSB]),

View file

@ -247,6 +247,19 @@ const stripeSupportedCountries = [
iban: true,
},
},
{
// New Zealand
code: 'NZ',
currency: 'NZD',
addressConfig: {
addressLine: true,
city: true,
postalCode: true,
},
accountConfig: {
accountNumber: true,
},
},
{
// Portugal
code: 'PT',

View file

@ -479,6 +479,7 @@
"PayoutDetailsForm.countryNames.IT": "Italy",
"PayoutDetailsForm.countryNames.LU": "Luxembourg",
"PayoutDetailsForm.countryNames.NL": "Netherlands",
"PayoutDetailsForm.countryNames.NZ": "New Zealand",
"PayoutDetailsForm.countryNames.PT": "Portugal",
"PayoutDetailsForm.countryNames.SE": "Sweden",
"PayoutDetailsForm.countryNames.US": "United States",