1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 13:12:50 +01:00

Minor fixes for wepay

This commit is contained in:
David Bomba 2021-11-16 10:35:04 +11:00
parent 0d9bab647a
commit 68a41768ac
3 changed files with 4 additions and 4 deletions

View File

@ -58,7 +58,7 @@ class ContactForgotPasswordController extends Controller
*/
public function showLinkRequestForm(Request $request)
{
$account_id = $request->get('account_id');
$account_id = $request->has('account_id') ? $request->get('account_id') : 1;
$account = Account::find($account_id);
$company = $account->companies->first();

View File

@ -68,7 +68,7 @@ class ContactResetPasswordController extends Controller
*/
public function showResetForm(Request $request, $token = null)
{
$account_id = $request->get('account_id');
$account_id = $request->has('account_id') ? $request->get('account_id') : 1;
$account = Account::find($account_id);
$db = $account->companies->first()->db;
$company = $account->companies->first();

View File

@ -208,8 +208,8 @@ class WePayPaymentDriver extends BaseDriver
return 'Processed successfully';
} elseif ($objectType == 'account') {
if ($accountId != $objectId) {
throw new \Exception('Unknown account');
if ($accountId !== $objectId) {
throw new \Exception('Unknown account ' . $accountId . ' does not equal '.$objectId);
}
$wepayAccount = $this->wepay->request('account', array(