Work on generic payment module

This commit is contained in:
Laurent Destailleur 2017-09-01 19:30:56 +02:00
parent 796684713f
commit 1a5f96123a
3 changed files with 24 additions and 11 deletions

View File

@ -1225,7 +1225,19 @@ if ($action != 'dopayment')
{
// Buttons for all payments registration methods
if (! empty($conf->paypal->enabled))
if (! empty($conf->paybox->enabled))
{
// If STRIPE_PICTO_FOR_PAYMENT is 'cb' we show a picto of a crdit card instead of paybox
print '<br><input class="button buttonpayment buttonpayment'.(empty($conf->global->PAYBOX_PICTO_FOR_PAYMENT)?'paybox':$conf->global->PAYBOX_PICTO_FOR_PAYMENT).'" type="submit" name="dopayment_paybox" value="'.$langs->trans("PayBoxDoPayment").'">';
}
if (! empty($conf->stripe->enabled))
{
// If STRIPE_PICTO_FOR_PAYMENT is 'cb' we show a picto of a crdit card instead of stripe
print '<br><input class="button buttonpayment buttonpayment'.(empty($conf->global->STRIPE_PICTO_FOR_PAYMENT)?'stripe':$conf->global->STRIPE_PICTO_FOR_PAYMENT).'" type="submit" name="dopayment__stripe" value="'.$langs->trans("StripeDoPayment").'">';
}
if (! empty($conf->paypal->enabled))
{
if (empty($conf->global->PAYPAL_API_INTEGRAL_OR_PAYPALONLY)) $conf->global->PAYPAL_API_INTEGRAL_OR_PAYPALONLY='integral';
@ -1238,16 +1250,6 @@ if ($action != 'dopayment')
print '<br><input class="button buttonpayment buttonpaymentpaypal" type="submit" name="dopayment_paypal" value="'.$langs->trans("PaypalDoPayment").'">';
}
}
if (! empty($conf->paybox->enabled))
{
print '<br><input class="button buttonpayment buttonpaymentpaybox" type="submit" name="dopayment_paybox" value="'.$langs->trans("PayBoxDoPayment").'">';
}
if (! empty($conf->stripe->enabled))
{
print '<br><input class="button buttonpayment buttonpaymentstripe" type="submit" name="dopayment_stripe" value="'.$langs->trans("StripeDoPayment").'">';
}
}
else
{

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

View File

@ -348,6 +348,17 @@ input.buttonpayment {
margin-bottom: 15px;
background-image: none;
}
input.buttonpaymentcb {
background-image: url(<?php echo dol_buildpath($path.'/theme/common/credit_card.png',1) ?>);
background-size: 24px;
background-repeat: no-repeat;
background-position: 5px 4px;
}
input.buttonpaymentcheque {
background-image: url(<?php echo dol_buildpath($path.'/paypal/img/object_paypal.png',1) ?>);
background-repeat: no-repeat;
background-position: 5px 4px;
}
input.buttonpaymentpaypal {
background-image: url(<?php echo dol_buildpath($path.'/paypal/img/object_paypal.png',1) ?>);
background-repeat: no-repeat;