function __Construct($dictionary)
 {
     parent::__Construct(get_class(), "desktop.html", $dictionary);
     //get input params
     $paymentConfigCode = Params::Get('state');
     $authCode = Params::Get('code');
     //load provider (verify code)
     $provider = Provider::FromPaymentConfigCode($paymentConfigCode);
     if (is_null($provider)) {
         //TODO: deal with this
     } else {
         //check stripe id isn't already set
         if (!is_null($provider->getStripeAccountId())) {
             //TODO: deal with this
         } else {
             $stripeAccount = StripeConnector::ConstructAccount($authCode);
             if (is_null($stripeAccount)) {
                 //TODO: deal with this
             } else {
                 //add to provider - clear code
                 $provider->setStripeAccountId($stripeAccount->getId());
                 $provider->setPaymentConfigCode(null);
                 $provider->save();
                 //notify success
                 $this->connected = true;
             }
         }
     }
 }
 function __Construct($dictionary, $provider)
 {
     parent::__Construct(get_class(), "desktop.html", $dictionary);
     $this->provider = $provider;
 }
Example #3
0
 function __Construct($requestPath, $dictionary)
 {
     parent::__Construct(get_class(), "desktop.html", $dictionary);
 }
Example #4
0
 function __Construct($dictionary, $cmsPage)
 {
     parent::__Construct(get_class(), "desktop.html", $dictionary);
     $this->cmsPage = $cmsPage;
 }
Example #5
0
 function __Construct($dictionary)
 {
     parent::__Construct(get_class(), 'mobile.html', $dictionary);
 }
Example #6
0
 function __Construct($dictionary, $showContactPopup = false)
 {
     parent::__Construct(get_class(), "desktop.html", $dictionary);
     $this->showContactPopup = $showContactPopup;
 }
 function __Construct($dictionary)
 {
     parent::__Construct(get_class(), "mobile-holding.html", $dictionary);
 }