mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-23 20:00:33 -04:00
Payment token fixes
This commit is contained in:
parent
7c0875841a
commit
15781ff895
@ -74,7 +74,7 @@ class BraintreePaymentDriver extends BasePaymentDriver
|
||||
$data['ButtonSource'] = 'InvoiceNinja_SP';
|
||||
}
|
||||
|
||||
if ( ! empty($this->input['sourceToken'])) {
|
||||
if ( ! $paymentMethod && ! empty($this->input['sourceToken'])) {
|
||||
$data['token'] = $this->input['sourceToken'];
|
||||
}
|
||||
|
||||
|
@ -72,6 +72,10 @@ class StripePaymentDriver extends BasePaymentDriver
|
||||
{
|
||||
$data = parent::paymentDetails($paymentMethod);
|
||||
|
||||
if ($paymentMethod) {
|
||||
return $data;
|
||||
}
|
||||
|
||||
if ( ! empty($this->input['sourceToken'])) {
|
||||
$data['token'] = $this->input['sourceToken'];
|
||||
unset($data['card']);
|
||||
|
@ -74,7 +74,7 @@ class WePayPaymentDriver extends BasePaymentDriver
|
||||
$data['feePayer'] = WEPAY_FEE_PAYER;
|
||||
$data['callbackUri'] = $this->accountGateway->getWebhookUrl();
|
||||
|
||||
if ($this->isGatewayType(GATEWAY_TYPE_BANK_TRANSFER)) {
|
||||
if ($this->isGatewayType(GATEWAY_TYPE_BANK_TRANSFER, $paymentMethod)) {
|
||||
$data['paymentMethodType'] = 'payment_bank';
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user