mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-22 08:40:56 -04:00
fixes
This commit is contained in:
parent
1d4e36d2f1
commit
f0eb912e07
@ -15,6 +15,8 @@ class S3Cleanup extends Command
|
|||||||
*/
|
*/
|
||||||
protected $signature = 'ninja:s3-cleanup';
|
protected $signature = 'ninja:s3-cleanup';
|
||||||
|
|
||||||
|
protected $log = '';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The console command description.
|
* The console command description.
|
||||||
*
|
*
|
||||||
|
@ -13,10 +13,12 @@ namespace App\Models;
|
|||||||
|
|
||||||
use App\Utils\Traits\MakesDates;
|
use App\Utils\Traits\MakesDates;
|
||||||
use Illuminate\Database\Eloquent\Model;
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||||
|
|
||||||
class ClientGatewayToken extends BaseModel
|
class ClientGatewayToken extends BaseModel
|
||||||
{
|
{
|
||||||
use MakesDates;
|
use MakesDates;
|
||||||
|
use SoftDeletes;
|
||||||
|
|
||||||
protected $casts = [
|
protected $casts = [
|
||||||
'meta' => 'object',
|
'meta' => 'object',
|
||||||
|
@ -60,12 +60,18 @@ use WePayCommon;
|
|||||||
'method' => '1',
|
'method' => '1',
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
try {
|
||||||
|
|
||||||
$response = $this->wepay_payment_driver->wepay->request('credit_card/authorize', array(
|
$response = $this->wepay_payment_driver->wepay->request('credit_card/authorize', array(
|
||||||
'client_id' => config('ninja.wepay.client_id'),
|
'client_id' => config('ninja.wepay.client_id'),
|
||||||
'client_secret' => config('ninja.wepay.client_secret'),
|
'client_secret' => config('ninja.wepay.client_secret'),
|
||||||
'credit_card_id' => (int)$data['credit_card_id'],
|
'credit_card_id' => (int)$data['credit_card_id'],
|
||||||
));
|
));
|
||||||
|
|
||||||
|
}
|
||||||
|
catch(\Exception $e){
|
||||||
|
return $this->wepay_payment_driver->processInternallyFailedPayment($this->wepay_payment_driver, $e);
|
||||||
|
}
|
||||||
// display the response
|
// display the response
|
||||||
// nlog($response);
|
// nlog($response);
|
||||||
|
|
||||||
@ -116,11 +122,16 @@ use WePayCommon;
|
|||||||
{
|
{
|
||||||
nlog("authorize the card first!");
|
nlog("authorize the card first!");
|
||||||
|
|
||||||
|
try {
|
||||||
$response = $this->wepay_payment_driver->wepay->request('credit_card/authorize', array(
|
$response = $this->wepay_payment_driver->wepay->request('credit_card/authorize', array(
|
||||||
'client_id' => config('ninja.wepay.client_id'),
|
'client_id' => config('ninja.wepay.client_id'),
|
||||||
'client_secret' => config('ninja.wepay.client_secret'),
|
'client_secret' => config('ninja.wepay.client_secret'),
|
||||||
'credit_card_id' => (int)$request->input('credit_card_id'),
|
'credit_card_id' => (int)$request->input('credit_card_id'),
|
||||||
));
|
));
|
||||||
|
}
|
||||||
|
catch(\Exception $e){
|
||||||
|
return $this->wepay_payment_driver->processInternallyFailedPayment($this->wepay_payment_driver, $e);
|
||||||
|
}
|
||||||
|
|
||||||
$credit_card_id = (int)$response->credit_card_id;
|
$credit_card_id = (int)$response->credit_card_id;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user