diff --git a/src/Client/Charge.php b/src/Client/Charge.php index e9417902..cb9c260f 100644 --- a/src/Client/Charge.php +++ b/src/Client/Charge.php @@ -48,12 +48,12 @@ protected static function getInstance($channel, $config) if (is_null(self::$instance)) { static::$instance = new ChargeContext(); + } - try { - static::$instance->initCharge($channel, $config); - } catch (PayException $e) { - throw $e; - } + try { + static::$instance->initCharge($channel, $config); + } catch (PayException $e) { + throw $e; } return static::$instance;