mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-04 09:14:36 -04:00
we pay
This commit is contained in:
parent
2b8d7c26da
commit
1a947d720d
@ -32,6 +32,7 @@ class WepaySignup extends Component
|
|||||||
public $country;
|
public $country;
|
||||||
public $ach;
|
public $ach;
|
||||||
public $wepay_payment_tos_agree;
|
public $wepay_payment_tos_agree;
|
||||||
|
public $debit_cards;
|
||||||
|
|
||||||
public $terms;
|
public $terms;
|
||||||
public $privacy_policy;
|
public $privacy_policy;
|
||||||
@ -77,6 +78,13 @@ class WepaySignup extends Component
|
|||||||
public function submit()
|
public function submit()
|
||||||
{
|
{
|
||||||
//need to create or get a new WePay CompanyGateway
|
//need to create or get a new WePay CompanyGateway
|
||||||
|
$cg = CompanyGateway::where('id', 49)
|
||||||
|
->where('company_id', $this->company->id)
|
||||||
|
->firstOrNew();
|
||||||
|
|
||||||
|
if(!$cg->id) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
$data = $this->validate($this->rules);
|
$data = $this->validate($this->rules);
|
||||||
|
|
||||||
@ -111,7 +119,7 @@ class WepaySignup extends Component
|
|||||||
'name' => $data['company_name'],
|
'name' => $data['company_name'],
|
||||||
'description' => ctrans('texts.wepay_account_description'),
|
'description' => ctrans('texts.wepay_account_description'),
|
||||||
'theme_object' => json_decode('{"name":"Invoice Ninja","primary_color":"0b4d78","secondary_color":"0b4d78","background_color":"f8f8f8","button_color":"33b753"}'),
|
'theme_object' => json_decode('{"name":"Invoice Ninja","primary_color":"0b4d78","secondary_color":"0b4d78","background_color":"f8f8f8","button_color":"33b753"}'),
|
||||||
'callback_uri' => $accountGateway->getWebhookUrl(),
|
'callback_uri' => route('payment_webhook', ['company_key' => $this->company->company_key, 'company_gateway_id' => $cg->hashed_id]),
|
||||||
'rbits' => $this->company->present()->rBits,
|
'rbits' => $this->company->present()->rBits,
|
||||||
'country' => $data['country'],
|
'country' => $data['country'],
|
||||||
];
|
];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user