Commit 71aeb10b authored by Mark Harding's avatar Mark Harding

(fix): account info not being sent on create

1 merge request!420Additional stripe steps and ability to add phone number
Pipeline #102375434 passed with stages
in 6 minutes and 49 seconds
......@@ -105,9 +105,11 @@ class account implements Interfaces\Api
$vars = Core\Router::getPutVars();
$user = Core\Session::getLoggedInUser();
$account = (new Payments\Stripe\Connect\Account())
->setUserGuid(Core\Session::getLoggedInUser()->guid)
->setUser(Core\Session::getLoggedInUser())
->setUserGuid($user->guid)
->setUser($user)
->setDestination('bank')
->setCountry($vars['country'])
->setSSN($vars['ssn'] ? str_pad((string) $vars['ssn'], 4, '0', STR_PAD_LEFT) : '')
......@@ -121,7 +123,9 @@ class account implements Interfaces\Api
->setState($vars['state'])
->setPostCode($vars['postCode'])
->setPhoneNumber($vars['phoneNumber'])
->setIp($_SERVER['HTTP_X_FORWARDED_FOR']);
->setIp($_SERVER['HTTP_X_FORWARDED_FOR'])
->setEmail($user->getEmail())
->setUrl($user->getURL());
try {
$stripeConnectManager = Core\Di\Di::_()->get('Stripe\Connect\Manager');
......
Please register or to comment