How to create user (or Error in official documentation or Please enter a valid phone number (e.g. for US \" 1 5551234567\"). If the phone number is valid & you are still seeing this) - Armor-Payments/armor_payments_ruby GitHub Wiki

When you take a look to https://www.armorpayments.com/api/classes/ArmorPayments.Api.Resource.Accounts.html you can find that ' -d "company=ACME+Inc.&user_name=John+Doe&user_email=[email protected]&user_phone=%28123%29+555-1234&email_confirmed=1&agreed_terms=1" https://api.armorpayments.com/accounts'

but it's not correct because user_phone=%28123%29+555-1234 its equal user_phone=(123)+555-1234

so when you will use snippet of code

@client = ArmorPayments::API.new 'fac5d8a4eab1c348925a7a542136dsds7d86', '6956753620b1cdecfbbcbe4a6f3287a4b748edc6b8eff1e8d8dbf23b6dsds79db8d5', sandbox=true data = @client.accounts.create({ 'company' => 'opcompany', 'user_name' => 'optser_name', 'user_email' => '[email protected]', 'address' => 'schevschenka 382, 1', 'city' => 'lviv', 'state' => 'LA', 'postal_code' => '0322', 'country' => 'US', 'user_phone' => '(123)+555-1234', 'email_confirmed' => '1' })

you will received an error

also when you will use phone number +1 5551234567 provided there https://www.armorpayments.com/api/classes/ArmorPayments.Api.Resource.Accounts.html you will be received error too

@data= {:body=> {"status"=>"error", "errors"=> {"user_phone"=> ["Please enter a valid phone number (e.g. for US \"+1 5551234567\"). If the phone number is valid & you are still seeing this error then check the country value passed, we accept only \"ISO 3166-1 alpha-2 two-letter country code (e.g. \"US\", or \"IN\")\" (http://www.armorpayments.com/api/classes/ArmorPayments.Api.Entity.Account.html). We use Google Phone library (https://github.com/googlei18n/libphonenumber) for phone validation."]}}, :cookies=>[],

what solution? Should be this one format of phone: 'user_phone' => '+1 312-555-1212'

It's international format !! Pls double check https://github.com/sstephenson/global_phone