SellYourSaas
SellYourSaas copied to clipboard
Data too long for column 'ext_payment_id' at row 1 ,
Describe the bug Return from stripe payment (test mode) :
Success to charge card (pi_3L8JqLHU6nqAr7bd0YGuXWKq with pk_test_51Ks45eHU6nqAr7bd3mFZKVBOmbYOBzo61HkZjxlPMa6nbAmpzkkGyt35mGm99FtQwiiY2RP27xfCc2tQfGmCxWZR0057qOFe38),
Data too long for column 'ext_payment_id' at row 1 ,
Email sent to thirdparty (to xxx@xxxx without any attached document, language = fr_FR)
Screenshots
"my" solution was to change in sellyoursaasutils.class.php line 1236
$paiement->ext_payment_id = $charge->id.':'.$customer->id.'@'.$stripearrayofkeys['publishable_key'];
to
$paiement->ext_payment_id = $charge->id;//.':'.$customer->id.'@'.$stripearrayofkeys['publishable_key'];
In v16, field is now 255 instead of 128. Still may not be enough, so a better fix would be to do $paiement->ext_payment_id = dol_trunc($charge->id.':'.$customer->id.'@'.$stripearrayofkeys['publishable_key'], 250); So we keep max of information.