1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-08 20:22:42 +01:00

Added payment gateway help/sign-up links

This commit is contained in:
Hillel Coren 2014-10-19 21:20:59 +03:00
parent ad8d5df8d5
commit de7f2d5bbd
4 changed files with 34 additions and 1 deletions

View File

@ -443,6 +443,10 @@ return array(
'invalid_counter' => 'To prevent a possible conflict please set either an invoice or quote number prefix',
'mark_sent' => 'Mark sent',
'gateway_help_1' => ':link to sign up for Authorize.net.',
'gateway_help_2' => ':link to sign up for Authorize.net.',
'gateway_help_17' => ':link to get your PayPal API signature.',
'gateway_help_23' => 'Note: use your secret API key, not your publishable API key.',
'gateway_help_27' => ':link to sign up for TwoCheckout.',
);

View File

@ -14,6 +14,23 @@ class Gateway extends Eloquent
{
return '/images/gateways/logo_'.$this->provider.'.png';
}
public function getHelp()
{
$link = '';
if ($this->id == GATEWAY_AUTHORIZE_NET || $this->id == GATEWAY_AUTHORIZE_NET_SIM) {
$link = 'http://reseller.authorize.net/application/?id=5560364';
} else if ($this->id == GATEWAY_PAYPAL_EXPRESS) {
$link = 'https://www.paypal.com/us/cgi-bin/webscr?cmd=_login-api-run';
} else if ($this->id == GATEWAY_TWO_CHECKOUT) {
$link = 'https://www.2checkout.com/referral?r=2c37ac2298';
}
$key = 'texts.gateway_help_' . $this->id;
$str = trans($key, ['link' => "<a href='$link' target='_blank'>Click here</a>"]);
return $key != $str ? $str : '';
}
public function getFields()
{

View File

@ -225,7 +225,10 @@ define('PAYMENT_LIBRARY_OMNIPAY', 1);
define('PAYMENT_LIBRARY_PHP_PAYMENTS', 2);
define('GATEWAY_AUTHORIZE_NET', 1);
define('GATEWAY_AUTHORIZE_NET_SIM', 2);
define('GATEWAY_PAYPAL_EXPRESS', 17);
define('GATEWAY_STRIPE', 23);
define('GATEWAY_TWO_CHECKOUT', 27);
define('GATEWAY_BEANSTREAM', 29);
define('GATEWAY_PSIGATE', 30);
define('GATEWAY_MOOLAH', 31);

View File

@ -57,6 +57,15 @@
@endif
@endforeach
@if($gateway->getHelp())
<div class="form-group">
<label class="control-label col-lg-4 col-sm-4"></label>
<div class="col-lg-8 col-sm-8">
{{ $gateway->getHelp() }}
</div>
</div>
@endif
</div>
@endforeach