mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Expose webhooks for all gateways in AP UI
This commit is contained in:
parent
3b8ef9ccd9
commit
e8f79e54f5
@ -46,7 +46,7 @@ class PaymentEmailEngine extends BaseEmailEngine
|
|||||||
$this->payment = $payment;
|
$this->payment = $payment;
|
||||||
$this->company = $payment->company;
|
$this->company = $payment->company;
|
||||||
$this->client = $payment->client;
|
$this->client = $payment->client;
|
||||||
$this->contact = $contact ?: $this->client->primary_contact()->first();
|
$this->contact = $contact ?: $this->client->contacts()->first();
|
||||||
$this->contact->load('client.company');
|
$this->contact->load('client.company');
|
||||||
$this->settings = $this->client->getMergedSettings();
|
$this->settings = $this->client->getMergedSettings();
|
||||||
$this->template_data = $template_data;
|
$this->template_data = $template_data;
|
||||||
|
@ -61,7 +61,7 @@ class Gateway extends StaticModel
|
|||||||
$link = 'https://bitpay.com/dashboard/signup';
|
$link = 'https://bitpay.com/dashboard/signup';
|
||||||
} elseif ($this->id == 18) {
|
} elseif ($this->id == 18) {
|
||||||
$link = 'https://applications.sagepay.com/apply/2C02C252-0F8A-1B84-E10D-CF933EFCAA99';
|
$link = 'https://applications.sagepay.com/apply/2C02C252-0F8A-1B84-E10D-CF933EFCAA99';
|
||||||
} elseif ($this->id == 20) {
|
} elseif ($this->id == 20 || $this->id == 56) {
|
||||||
$link = 'https://dashboard.stripe.com/account/apikeys';
|
$link = 'https://dashboard.stripe.com/account/apikeys';
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -89,17 +89,20 @@ class Gateway extends StaticModel
|
|||||||
break;
|
break;
|
||||||
case 7:
|
case 7:
|
||||||
return [
|
return [
|
||||||
GatewayType::CREDIT_CARD => ['refund' => false, 'token_billing' => true], // Mollie
|
GatewayType::CREDIT_CARD => ['refund' => false, 'token_billing' => true, 'webhooks' => [' ']], // Mollie
|
||||||
GatewayType::BANK_TRANSFER => ['refund' => false, 'token_billing' => true],
|
GatewayType::BANK_TRANSFER => ['refund' => false, 'token_billing' => true, 'webhooks' => [' ']],
|
||||||
GatewayType::KBC => ['refund' => false, 'token_billing' => false],
|
GatewayType::KBC => ['refund' => false, 'token_billing' => false, 'webhooks' => [' ']],
|
||||||
GatewayType::BANCONTACT => ['refund' => false, 'token_billing' => false],
|
GatewayType::BANCONTACT => ['refund' => false, 'token_billing' => false, 'webhooks' => [' ']],
|
||||||
GatewayType::IDEAL => ['refund' => false, 'token_billing' => false],
|
GatewayType::IDEAL => ['refund' => false, 'token_billing' => false, 'webhooks' => [' ']],
|
||||||
];
|
];
|
||||||
case 15:
|
case 15:
|
||||||
return [GatewayType::PAYPAL => ['refund' => true, 'token_billing' => false]]; //Paypal
|
return [
|
||||||
|
GatewayType::PAYPAL => ['refund' => true, 'token_billing' => false]
|
||||||
|
]; //Paypal
|
||||||
break;
|
break;
|
||||||
case 20:
|
case 20:
|
||||||
return [GatewayType::CREDIT_CARD => ['refund' => true, 'token_billing' => true],
|
return [
|
||||||
|
GatewayType::CREDIT_CARD => ['refund' => true, 'token_billing' => true],
|
||||||
GatewayType::BANK_TRANSFER => ['refund' => true, 'token_billing' => true, 'webhooks' => ['source.chargeable','charge.succeeded']],
|
GatewayType::BANK_TRANSFER => ['refund' => true, 'token_billing' => true, 'webhooks' => ['source.chargeable','charge.succeeded']],
|
||||||
GatewayType::ALIPAY => ['refund' => false, 'token_billing' => false],
|
GatewayType::ALIPAY => ['refund' => false, 'token_billing' => false],
|
||||||
GatewayType::APPLE_PAY => ['refund' => false, 'token_billing' => false],
|
GatewayType::APPLE_PAY => ['refund' => false, 'token_billing' => false],
|
||||||
@ -109,30 +112,41 @@ class Gateway extends StaticModel
|
|||||||
GatewayType::GIROPAY => ['refund' => true, 'token_billing' => true, 'webhooks' => ['source.chargeable', 'charge.succeeded']],
|
GatewayType::GIROPAY => ['refund' => true, 'token_billing' => true, 'webhooks' => ['source.chargeable', 'charge.succeeded']],
|
||||||
GatewayType::EPS => ['refund' => true, 'token_billing' => true, 'webhooks' => ['source.chargeable', 'charge.succeeded']],
|
GatewayType::EPS => ['refund' => true, 'token_billing' => true, 'webhooks' => ['source.chargeable', 'charge.succeeded']],
|
||||||
GatewayType::BANCONTACT => ['refund' => true, 'token_billing' => true, 'webhooks' => ['source.chargeable', 'charge.succeeded']],
|
GatewayType::BANCONTACT => ['refund' => true, 'token_billing' => true, 'webhooks' => ['source.chargeable', 'charge.succeeded']],
|
||||||
GatewayType::IDEAL => ['refund' => true, 'token_billing' => true, 'webhooks' => ['source.chargeable', 'charge.succeeded']]];
|
GatewayType::IDEAL => ['refund' => true, 'token_billing' => true, 'webhooks' => ['source.chargeable', 'charge.succeeded']],
|
||||||
|
];
|
||||||
|
|
||||||
case 39:
|
case 39:
|
||||||
return [GatewayType::CREDIT_CARD => ['refund' => true, 'token_billing' => true]]; //Checkout
|
return [GatewayType::CREDIT_CARD => ['refund' => true, 'token_billing' => true, 'webhooks' => [' ']]]; //Checkout
|
||||||
break;
|
break;
|
||||||
case 46:
|
case 46:
|
||||||
return [GatewayType::CREDIT_CARD => ['refund' => true, 'token_billing' => true]]; //Paytrace
|
return [GatewayType::CREDIT_CARD => ['refund' => true, 'token_billing' => true]]; //Paytrace
|
||||||
case 49:
|
case 49:
|
||||||
return [GatewayType::CREDIT_CARD => ['refund' => true, 'token_billing' => true],
|
return [
|
||||||
GatewayType::BANK_TRANSFER => ['refund' => true, 'token_billing' => true]]; //WePay
|
GatewayType::CREDIT_CARD => ['refund' => true, 'token_billing' => true],
|
||||||
|
GatewayType::BANK_TRANSFER => ['refund' => true, 'token_billing' => true, 'webhooks' => [' ']]
|
||||||
|
]; //WePay
|
||||||
break;
|
break;
|
||||||
case 50:
|
case 50:
|
||||||
return [
|
return [
|
||||||
GatewayType::CREDIT_CARD => ['refund' => true, 'token_billing' => true], //Braintree
|
GatewayType::CREDIT_CARD => ['refund' => true, 'token_billing' => true], //Braintree
|
||||||
GatewayType::PAYPAL => ['refund' => true, 'token_billing' => true],
|
GatewayType::PAYPAL => ['refund' => true, 'token_billing' => true],
|
||||||
GatewayType::BANK_TRANSFER => ['refund' => true, 'token_billing' => true],
|
GatewayType::BANK_TRANSFER => ['refund' => true, 'token_billing' => true, 'webhooks' => [' ']],
|
||||||
];
|
];
|
||||||
break;
|
break;
|
||||||
case 56:
|
case 56:
|
||||||
return [GatewayType::CREDIT_CARD => ['refund' => true, 'token_billing' => true],
|
return [
|
||||||
|
GatewayType::CREDIT_CARD => ['refund' => true, 'token_billing' => true],
|
||||||
GatewayType::BANK_TRANSFER => ['refund' => true, 'token_billing' => true, 'webhooks' => ['source.chargeable','charge.succeeded']],
|
GatewayType::BANK_TRANSFER => ['refund' => true, 'token_billing' => true, 'webhooks' => ['source.chargeable','charge.succeeded']],
|
||||||
GatewayType::ALIPAY => ['refund' => false, 'token_billing' => false],
|
GatewayType::ALIPAY => ['refund' => false, 'token_billing' => false],
|
||||||
GatewayType::APPLE_PAY => ['refund' => false, 'token_billing' => false],
|
GatewayType::APPLE_PAY => ['refund' => false, 'token_billing' => false],
|
||||||
GatewayType::SOFORT => ['refund' => true, 'token_billing' => true, 'webhooks' => ['source.chargeable', 'charge.succeeded']]]; //Stripe
|
GatewayType::SOFORT => ['refund' => true, 'token_billing' => true, 'webhooks' => ['source.chargeable', 'charge.succeeded']], //Stripe
|
||||||
|
GatewayType::SEPA => ['refund' => true, 'token_billing' => true, 'webhooks' => ['source.chargeable', 'charge.succeeded']],
|
||||||
|
GatewayType::PRZELEWY24 => ['refund' => true, 'token_billing' => true, 'webhooks' => ['source.chargeable', 'charge.succeeded']],
|
||||||
|
GatewayType::GIROPAY => ['refund' => true, 'token_billing' => true, 'webhooks' => ['source.chargeable', 'charge.succeeded']],
|
||||||
|
GatewayType::EPS => ['refund' => true, 'token_billing' => true, 'webhooks' => ['source.chargeable', 'charge.succeeded']],
|
||||||
|
GatewayType::BANCONTACT => ['refund' => true, 'token_billing' => true, 'webhooks' => ['source.chargeable', 'charge.succeeded']],
|
||||||
|
GatewayType::IDEAL => ['refund' => true, 'token_billing' => true, 'webhooks' => ['source.chargeable', 'charge.succeeded']],
|
||||||
|
];
|
||||||
break;
|
break;
|
||||||
case 57:
|
case 57:
|
||||||
return [
|
return [
|
||||||
@ -141,12 +155,12 @@ class Gateway extends StaticModel
|
|||||||
break;
|
break;
|
||||||
case 52:
|
case 52:
|
||||||
return [
|
return [
|
||||||
GatewayType::BANK_TRANSFER => ['refund' => true, 'token_billing' => true] // GoCardless
|
GatewayType::BANK_TRANSFER => ['refund' => true, 'token_billing' => true, 'webhooks' => [' ']] // GoCardless
|
||||||
];
|
];
|
||||||
break;
|
break;
|
||||||
case 58:
|
case 58:
|
||||||
return [
|
return [
|
||||||
GatewayType::HOSTED_PAGE => ['refund' => false, 'token_billing' => false] // Razorpay
|
GatewayType::HOSTED_PAGE => ['refund' => false, 'token_billing' => false, 'webhooks' => [' ']] // Razorpay
|
||||||
];
|
];
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user