Fix for token billing
This commit is contained in:
parent
c6bf1d5fcc
commit
cf3465b5e2
2 changed files with 4 additions and 3 deletions
|
|
@ -113,9 +113,9 @@ class PaymentMethod extends EntityModel
|
|||
*/
|
||||
public function scopeClientId($query, $clientId)
|
||||
{
|
||||
return $query->with(['contact' => function($query) use ($clientId) {
|
||||
return $query->whereClientId($clientId);
|
||||
}]);
|
||||
$query->whereHas('contact', function($query) use ($clientId) {
|
||||
$query->whereClientId($clientId);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -531,6 +531,7 @@ class BasePaymentDriver
|
|||
public function createPaymentMethod($customer)
|
||||
{
|
||||
$paymentMethod = PaymentMethod::createNew($this->invitation);
|
||||
$paymentMethod->contact_id = $this->contact()->id;
|
||||
$paymentMethod->ip = Request::ip();
|
||||
$paymentMethod->account_gateway_token_id = $customer->id;
|
||||
$paymentMethod->setRelation('account_gateway_token', $customer);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue