/** * Construct the FlexPay Client for given brand (Verotel, CardBilling, FreenomPay). * * @param integer $shop_id * @param string $secret * @param string $brand_name * @throws Exception if no secret or shopID was given */ public function __construct($shopId, $secret, $brand = null) { if ($brand) { $this->brand = $brand; } else { $this->brand = Brand::create_from_name('Verotel'); } if (empty($secret)) { throw new Exception("no secret given"); } $this->secret = $secret; if (empty($shopId)) { throw new Exception("no shopID given"); } $this->shopId = $shopId; }