mirror of
https://github.com/v2board/v2board.git
synced 2024-11-10 09:39:10 +08:00
fix: payment
This commit is contained in:
parent
3e60cbf968
commit
aa78761115
@ -14,9 +14,11 @@ class PaymentService
|
||||
if (!class_exists($this->class)) abort(500, 'gate is not found');
|
||||
if ($id) $payment = Payment::find($id)->toArray();
|
||||
$this->config = [];
|
||||
if (isset($payment) && $payment['config']) $this->config = json_decode($payment['config'], true);
|
||||
$this->config['id'] = $id;
|
||||
$this->config['enable'] = $payment['enable'];
|
||||
if (isset($payment)) {
|
||||
$this->config = json_decode($payment['config'], true);
|
||||
$this->config['enable'] = $payment['enable'];
|
||||
$this->config['id'] = $payment['id'];
|
||||
};
|
||||
$this->payment = new $this->class($this->config);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user