#memekyTeam-custom-onboarding

1 messages · Page 1 of 1 (latest)

tacit bluffBOT
restive zephyr
#

It sounds like the currency you're using is not supported in the country you're trying to set. Do you have a specific question about this?

zinc phoenix
#

If nothing happens, how do I make the message change language? example: spanish

#

my website is in several languages and I want to show the error messages in other languages

#

This is possible?

#

can you change the language?

restive zephyr
#

What product are you using? Stripe Checkout? Custom API integration? What's actually throwing an error?

Please try to be as explicit as possible

zinc phoenix
#

This doesn't matter. The question is, can I show the error message in the language that I want? This message is in English, can it be in Spanish, Russian, Chinese?

#

I have subscriptions, custom accounts, checkouts...

#

I use in php
try{
// whatever....
} catch(Exception $e) {

$api_error = $e->getMessage();

$output = [
'error' => $api_error
];
echo json_encode($output);

}

This works, it's not the problem, the problem is that the message is always in English and I want it in another language

#

I'm not a native English speaker and I'm still not explaining myself well, sorry and thanks for your patience 🙂

restive zephyr
#

You can't get non-english error codes from Stipe. You would need to catch the error in english and then modify the language text on your end

zinc phoenix
#

okay thanks as always a good service you always solve my doubts 🙂 one last question do you know any way? any github or something?

#

Are these error codes anywhere in the stripe docs??

restive zephyr
zinc phoenix
#

thank you 😉 !!

#

Are these error codes anywhere in the stripe docs??

restive zephyr
#

Most of them, yes: https://stripe.com/docs/error-codes but I'd recommend creating a wrapper that is able to just auto translates any error code, as you might get exceptions/errors that don't show up in these docs

Learn more about error codes and how to resolve them.

oak blade
#

HI there 👋 jumping in as my teammate needs to step away soon. One thing I noticed while reviewing the thread, is that these seem to be server-side error messages rather than errors thrown by our client-side code, so I suspect some of the errors that would be encountered aren't suitable to raise to your end-users/customers. What type of errors are you trying to watch for, and what audience are you wanting to surface those to?

zinc phoenix
#

specifically in custom accounts it is the one that worries me the most

#

I'll pass you the code, ok?

#

try{

$stripe->accounts->create(
[
'country' => $pais,
'type' => 'custom',
'default_currency' => $currency,
"email" => $email,
'capabilities' => [
'card_payments' => ['requested' => true],
'transfers' => ['requested' => true],
],

"company"=> [
"name"=> 'example',

],
"business_type" => "individual",
'business_profile' => [
"mcc" => "5734",
"product_description" => "bal bla bla",
"support_email" => 'gestion@memeky.com',
"support_phone"=> "+34689534548",
"url" => "www.memeky.com"
],

"individual"=> [
"email"=> $email,
"first_name" => $nombre,
"last_name" => $apellidos,
"address"=>[
"city" => $ciudad,
"country" => $pais,
"line1" => $direccion,
"postal_code"=> $zipCode,
"state"=> $provincia
],
"phone"=> $telefono,
"dob" => [
"day"=> $day,
"month"=> $month,
"year"=> $year
],

"id_number"=> $dni

],

"external_account" => [
"country" => $paisCuenta,
"currency" => $currency,
"account_number" => $iban ,
"object" => "bank_account"
],

'tos_acceptance' => [
"date"=> $t,
"ip"=> $f,
"user_agent"=> $s
],

]
);

$output = [
'client_secret' => $iban,
];
echo json_encode($output);

} catch (Exception $e) {

$api_error = $e->getMessage();

$output = [
'error' => $api_error
];
echo json_encode($output);

}

oak blade
#

That appears to be your server-side code for creating a Connected Account.

zinc phoenix
#

yes

#

I also use payments and refunds with this try{}catch(){} structure

oak blade
#

So the errors in question are the ones being returned to your server? Is your code doing anything to interpret those errors so you can provide your users that are trying to create a Connected Account with advice on how to correct the problematic information?

My fear is that if you surface server-side errors to your users, they won't understand what they need to do to avoid them and will result in a poor user experience.

zinc phoenix
#

If they make a mistake in an input, they can perfectly correct that input, fill it with information, for example, my zipcode is wrong, I missed the error, I put it again and I don't have to fill in any wrong field, just the zip code

#

I'm not a native of English, if I don't explain myself well, I'm sorry.

oak blade
#

Sorry, I'm not sure what I'm supposed to take away from the provided link.

oak blade
zinc phoenix
#

I show you a prototype

#

How does the user know if his zip fails or something is wrong?

oak blade
#

You tell them

#

This is your onboarding flow, you will need to surface relevant errors to your users.

zinc phoenix
#

imagine that the person is wrong only in the zip code

#

or in your city

#

I do not want to violate any policy or harm your image or security, we are going to try to clarify this

oak blade
#

Sorry, I'm not sure if that was meant to be a question, but if it was I'm not sure I understand what you're trying to ask.

zinc phoenix
#

I'll give you an example for a moment

#

I do not want to violate any policy or harm your image or security, we are going to try to clarify this

#

imagine user filling in the data, and fail

#

this is bad ?

#

we are a company that is creating the project, no guys with shopify or anything, we want to take this very seriously there are a lot of people and money at stake we want to be sure of this

#

this is the prototype

oak blade
#

That's a question for you to answer as this is your onboarding process, and is dependent on the user experience that you want to provide.

zinc phoenix
#

Does this break any law, or do you mind if I show you server-side errors if our users make a mistake when entering some data? If so, what can we do to change this?

oak blade
#

An invalid zip is an easier error, if you look back at the error from your original message though what would you tell your user they did wrong? Is it the problem the country they selected for the Stripe account, is it the country they selected for their bank account, or is it the currency they selected for the bank account? If you know some of those are invalid combinations, should your form prevent your users from selecting those combinations to begin with?

Ultimately how you choose to surface errors to your users in this flow is up to you.

If you want to see an example of how we handle this, then you can compare your process with our hosted onboarding experience for Custom accounts:
https://stripe.com/docs/connect/connect-onboarding

Let Stripe collect identity verification information for your Custom connected accounts.

zinc phoenix
#

$testNombre = "/^[a-zZàáâäãåąčćęèéêëėįìíîïłńòóôöõøùúûüųūÿýżźñçčšžÀÁÂÄÃÅĄĆČĖĘÈÉÊËÌÍÎÏĮŁŃÒÓÔÖÕØÙÚÛÜŲŪŸÝŻŹÑßÇŒÆČŠŽ∂ð ]+$/i";
$testFecha = "/^\d{4}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])$/";
$testEnter = "/^[<>&$|/··]$/";
$testIban = "/^([A-Z]{2}[ '+'\'+'-]?[0-9]{2})(?=(?:[ '+'\'+'-]?[A-Z0-9]){9,30}$)((?:[ '+'\'+'-]?[A-Z0-9]{3,5}){2,7})([ '+'\'+'-]?[A-Z0-9]{1,3})?$/";
$telef = "/^(+|\d)[0-9-.]{7,16}$/";
$testZip = "/^\d{5}([-]|\s
)?(\d{4})?$/";
$testId = "/^(?!^0+$)[a-zA-Z0-9-.]{3,20}$/";
$testMix = "/^[a-zA-Z0-9]{1,100}$/";
$patterCodN = '/^[0-9]{1,9}$/';
$testdni = "/^(?!^0+$)[a-zA-Z0-9-.]{3,20}$/";

#

if(preg_match($testNombre, $nombre) && !empty($nombre) && strlen($nombre) <= 50 && preg_match($testNombre, $apellidos) && !empty($apellidos) && strlen($apellidos) <= 50
&& preg_match($testNombre, $pais) && !empty($pais) && strlen($pais) <= 2
&& preg_match($telef, $telefono) && !empty($telefono) && strlen($telefono) <= 16
&& preg_match($testNombre, $provincia) && !empty($provincia) && strlen($provincia) <= 50 && preg_match($testNombre, $ciudad) && !empty($ciudad) && strlen($ciudad) <= 50
&& !preg_match($testEnter, $direccion) && !empty($direccion) && strlen($direccion) <= 50
&& preg_match($testZip, $zipCode) && $zipCode!="" && strlen($zipCode) <= 16
&& preg_match($testNombre, $paisCuenta) && !empty($paisCuenta) && strlen($paisCuenta) <= 50
&& preg_match($testIban, $iban) && !empty($iban) && strlen($iban) <= 50
&& preg_match($testId, $dni) && !empty($dni) && strlen($dni) <= 20
&& preg_match($testMix, $referencia) && !empty($referencia) && strlen($referencia) <= 100
&& $fecha <= $timeNow && preg_match($patterCodN, $id) && !empty($id)
){

#

We filter all this. I don't think it's necessary for us to have all the zip codes, all the countries from which stripe can be operated?

#

We want to operate all over the world. Do you want us all to have the zip code? all cities? all the nif?

#

if you finally filtered it the same

#

all cities

oak blade
#

Sorry, I don't understand how we got from error messages to validating zip codes. My suggestion was simply that you may not want to surface server-side errors to your users without offering some interpretation as well to better map the message to the flow your user is seeing.

zinc phoenix
#

okay I understand, we will do the following with your information and that of your partner we will filter the messages in the way that I will show you so that they are not direct from the server side, now I will give you an example

#

try{
//whatever...

} catch (Exception $e) {

$api_error = $e->getMessage();

if($api_error = 'Invalid ES postal code' ){

$api_error = 'change the zip';
}elseif($api_error = 'currency in not alowed...' ){

$api_error = 'An error ocurred!';
}elseif($api_error = 'invalid bla bla....' ){

$api_error = 'An error ocurred try again!';
}
....

$output = [
'error' => $api_error
];
echo json_encode($output);

}

#

I think you want this right?

oak blade
#

I don't know what you're expecting me to learn from that code snippet, this is your onboarding process so it is up to you what information you surface to your users and how.

Have you considered using our hosted onboarding flow? It already handles things such as error localization and data validation, but understand if there is a limiting factor that prevents it from being a good fit for our scenario.

zinc phoenix
#

I personally promise to read all the terms and conditions and comply with them, I know you don't really like that we create personalized accounts of our websites that want us to use the image but understand that this breaks the user experience a lot because you leave the page

oak blade
#

memekyTeam-custom-onboarding

zinc phoenix
spark hare
#

👋 stepping in as Toby needs to step away

#

Sounds like you are having an issue with pre-filling Custom Connect data for onboarding?

zinc phoenix
#

They do not work correctly I am creating a form, everything works ok what happens is that in the errors it shows server director errors now I pass the code and I want custom because it breaks the line of my website

#

I don't want the user to go to this page

#

is the prototype

spark hare
#

Sorry I don't understand what that could mean.

#

What error are you seeing specifically?

zinc phoenix
#

Is the following code to display errors wrong?

#

try{
$stripe->accounts->create(
[
'country' => $pais,
'type' => 'custom',
'default_currency' => $currency,
"email" => $email,
'capabilities' => [
'card_payments' => ['requested' => true],
'transfers' => ['requested' => true],
],

"company"=> [
"name"=> 'Illuminate',

],
"business_type" => "individual",
'business_profile' => [
"mcc" => "5734",
"product_description" => "Es una red social de memes donde los usuarios suben sus memes en diferentes categorías y otros los votan; además se realiza una competición mensual dependiendo de la suscripción, pueden acceder a un contenido y además jugar dinero para ver cuál de sus memes recibe más votos al iniciar la web automáticamente hay un tutorial que lo explica de forma detallada.",
"support_email" => 'gestion@memeky.com',
"support_phone"=> "+34689534962",
"url" => "www.memeky.com"
],

"individual"=> [
"email"=> $email,
"first_name" => $nombre,
"last_name" => $apellidos,
"address"=>[
"city" => $ciudad,
"country" => $pais,
"line1" => $direccion,
"postal_code"=> $zipCode,
"state"=> $provincia
],
"phone"=> $telefono,
"dob" => [
"day"=> $day,
"month"=> $month,
"year"=> $year
],

"id_number"=> $dni

],

"external_account" => [
"country" => $paisCuenta,
"currency" => $currency,
"account_number" => $iban ,
"object" => "bank_account"
],

'tos_acceptance' => [
"date"=> $t,
"ip"=> $f,
"user_agent"=> $s
],

]
);

$output = [
'client_secret' => $iban,
];
echo json_encode($output);
} catch (Exception $e) {

$api_error = $e->getMessage();

$output = [
'error' => $api_error
];
echo json_encode($output);

}

#

I proposed to his partner this:

#

try{
//whatever...

} catch (Exception $e) {

$api_error = $e->getMessage();

if($api_error = 'Invalid ES postal code' ){

$api_error = 'change the zip';
}elseif($api_error = 'currency in not alowed...' ){

$api_error = 'An error ocurred!';
}elseif($api_error = 'invalid bla bla....' ){

$api_error = 'An error ocurred try again!';
}
....

$output = [
'error' => $api_error
];
echo json_encode($output);

}

spark hare
#

That code will catch an error, json encode it, and then echo it to your client yes. So it is overall a fine way to do it if you want that route?

#

You are a developer though and you need to write code for your error handling -- I can't really help you with that. I'm happy to help you if you are running into a Stripe-specific issue.

zinc phoenix
#

does not violate any policy Can this bother you?

#

I'm not native and I was having a hard time with the language so I'm sorry and I appreciate the patience of your partner Toby and yours. I have understood according to Toby that this was a bad way and that you did not like it so I wanted to fix it but if it is okay the matter is settled. Thank you for everything and have a good day, excellent service from you and your colleagues:) a pleasure

spark hare
#

But overall I think you are asking if the way you are displaying errors with onboarding are okay, and they seem so to me!

zinc phoenix
#

thank you have a good day 10/11!!! 🙂