mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-11 13:42:49 +01:00
Fix for token billing
This commit is contained in:
parent
e03a185d39
commit
2440070376
@ -606,7 +606,7 @@ if (!defined('CONTACT_EMAIL')) {
|
|||||||
define('NINJA_WEB_URL', env('NINJA_WEB_URL', 'https://www.invoiceninja.com'));
|
define('NINJA_WEB_URL', env('NINJA_WEB_URL', 'https://www.invoiceninja.com'));
|
||||||
define('NINJA_APP_URL', env('NINJA_APP_URL', 'https://app.invoiceninja.com'));
|
define('NINJA_APP_URL', env('NINJA_APP_URL', 'https://app.invoiceninja.com'));
|
||||||
define('NINJA_DATE', '2000-01-01');
|
define('NINJA_DATE', '2000-01-01');
|
||||||
define('NINJA_VERSION', '2.6.2' . env('NINJA_VERSION_SUFFIX'));
|
define('NINJA_VERSION', '2.6.3' . env('NINJA_VERSION_SUFFIX'));
|
||||||
|
|
||||||
define('SOCIAL_LINK_FACEBOOK', env('SOCIAL_LINK_FACEBOOK', 'https://www.facebook.com/invoiceninja'));
|
define('SOCIAL_LINK_FACEBOOK', env('SOCIAL_LINK_FACEBOOK', 'https://www.facebook.com/invoiceninja'));
|
||||||
define('SOCIAL_LINK_TWITTER', env('SOCIAL_LINK_TWITTER', 'https://twitter.com/invoiceninja'));
|
define('SOCIAL_LINK_TWITTER', env('SOCIAL_LINK_TWITTER', 'https://twitter.com/invoiceninja'));
|
||||||
|
@ -113,9 +113,9 @@ class PaymentMethod extends EntityModel
|
|||||||
*/
|
*/
|
||||||
public function scopeClientId($query, $clientId)
|
public function scopeClientId($query, $clientId)
|
||||||
{
|
{
|
||||||
return $query->with(['contact' => function($query) use ($clientId) {
|
$query->whereHas('contact', function($query) use ($clientId) {
|
||||||
return $query->whereClientId($clientId);
|
$query->whereClientId($clientId);
|
||||||
}]);
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -516,6 +516,7 @@ class BasePaymentDriver
|
|||||||
public function createPaymentMethod($customer)
|
public function createPaymentMethod($customer)
|
||||||
{
|
{
|
||||||
$paymentMethod = PaymentMethod::createNew($this->invitation);
|
$paymentMethod = PaymentMethod::createNew($this->invitation);
|
||||||
|
$paymentMethod->contact_id = $this->contact()->id;
|
||||||
$paymentMethod->ip = Request::ip();
|
$paymentMethod->ip = Request::ip();
|
||||||
$paymentMethod->account_gateway_token_id = $customer->id;
|
$paymentMethod->account_gateway_token_id = $customer->id;
|
||||||
$paymentMethod->setRelation('account_gateway_token', $customer);
|
$paymentMethod->setRelation('account_gateway_token', $customer);
|
||||||
|
Loading…
Reference in New Issue
Block a user