mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Make sure payments reference newly added payment methods
This commit is contained in:
parent
104264607b
commit
6138e1132f
@ -493,7 +493,7 @@ class PaymentController extends BaseController
|
|||||||
unset($details['token']);
|
unset($details['token']);
|
||||||
$details['cardReference'] = $sourceReference;
|
$details['cardReference'] = $sourceReference;
|
||||||
} elseif ($account->token_billing_type_id == TOKEN_BILLING_ALWAYS || Input::get('token_billing') || $paymentType == PAYMENT_TYPE_STRIPE_ACH) {
|
} elseif ($account->token_billing_type_id == TOKEN_BILLING_ALWAYS || Input::get('token_billing') || $paymentType == PAYMENT_TYPE_STRIPE_ACH) {
|
||||||
$token = $this->paymentService->createToken($gateway, $details, $accountGateway, $client, $invitation->contact_id, $customerReference/* return parameter */);
|
$token = $this->paymentService->createToken($gateway, $details, $accountGateway, $client, $invitation->contact_id, $customerReference/* return parameter */, $paymentMethod/* return parameter */);
|
||||||
if ($token) {
|
if ($token) {
|
||||||
$details['token'] = $token;
|
$details['token'] = $token;
|
||||||
$details['customerReference'] = $customerReference;
|
$details['customerReference'] = $customerReference;
|
||||||
@ -524,7 +524,7 @@ class PaymentController extends BaseController
|
|||||||
$details['paymentMethodToken'] = $sourceReference;
|
$details['paymentMethodToken'] = $sourceReference;
|
||||||
unset($details['token']);
|
unset($details['token']);
|
||||||
} elseif ($account->token_billing_type_id == TOKEN_BILLING_ALWAYS || Input::get('token_billing')) {
|
} elseif ($account->token_billing_type_id == TOKEN_BILLING_ALWAYS || Input::get('token_billing')) {
|
||||||
$token = $this->paymentService->createToken($gateway, $details, $accountGateway, $client, $invitation->contact_id, $customerReference/* return parameter */);
|
$token = $this->paymentService->createToken($gateway, $details, $accountGateway, $client, $invitation->contact_id, $customerReference/* return parameter */, $paymentMethod/* return parameter */);
|
||||||
if ($token) {
|
if ($token) {
|
||||||
$details['paymentMethodToken'] = $token;
|
$details['paymentMethodToken'] = $token;
|
||||||
$details['customerId'] = $customerReference;
|
$details['customerId'] = $customerReference;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user