FIX Online payment
This commit is contained in:
parent
4e26eefe6e
commit
a63a6a5853
@ -1687,26 +1687,51 @@ if ($action != 'dopayment')
|
|||||||
if ((empty($paymentmethod) || $paymentmethod == 'paybox') && ! empty($conf->paybox->enabled))
|
if ((empty($paymentmethod) || $paymentmethod == 'paybox') && ! empty($conf->paybox->enabled))
|
||||||
{
|
{
|
||||||
// If STRIPE_PICTO_FOR_PAYMENT is 'cb' we show a picto of a crdit card instead of paybox
|
// If STRIPE_PICTO_FOR_PAYMENT is 'cb' we show a picto of a crdit card instead of paybox
|
||||||
print '<br><div class="button buttonpayment"><span class="fa fa-credit-card"></span> <input class="" type="submit" name="dopayment_paybox" value="'.$langs->trans("PayBoxDoPayment").'">';
|
print '<br><div class="button buttonpayment" id="div_dopayment_paybox"><span class="fa fa-credit-card"></span> <input class="" type="submit" id="dopayment_paybox" name="dopayment_paybox" value="'.$langs->trans("PayBoxDoPayment").'">';
|
||||||
print '<br>';
|
print '<br>';
|
||||||
print '<span class="buttonpaymentsmall">'.$langs->trans("CreditOrDebitCard").'</span>';
|
print '<span class="buttonpaymentsmall">'.$langs->trans("CreditOrDebitCard").'</span>';
|
||||||
print '</div>';
|
print '</div>';
|
||||||
|
print '<script>
|
||||||
|
$( document ).ready(function() {
|
||||||
|
$("#div_dopayment_paybox").click(function(){
|
||||||
|
$("#dopayment_paybox").click();
|
||||||
|
});
|
||||||
|
$("#dopayment_paybox").click(function(e){
|
||||||
|
$("#div_dopayment_paybox").css( \'cursor\', \'wait\' );
|
||||||
|
e.stopPropagation();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
';
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((empty($paymentmethod) || $paymentmethod == 'stripe') && ! empty($conf->stripe->enabled))
|
if ((empty($paymentmethod) || $paymentmethod == 'stripe') && ! empty($conf->stripe->enabled))
|
||||||
{
|
{
|
||||||
// If STRIPE_PICTO_FOR_PAYMENT is 'cb' we show a picto of a crdit card instead of stripe
|
// If STRIPE_PICTO_FOR_PAYMENT is 'cb' we show a picto of a crdit card instead of stripe
|
||||||
print '<br><div class="button buttonpayment"><span class="fa fa-credit-card"></span> <input class="" type="submit" name="dopayment_stripe" value="'.$langs->trans("StripeDoPayment").'">';
|
print '<br><div class="button buttonpayment" id="div_dopayment_stripe"><span class="fa fa-credit-card"></span> <input class="" type="submit" id="dopayment_stripe" name="dopayment_stripe" value="'.$langs->trans("StripeDoPayment").'">';
|
||||||
print '<br>';
|
print '<br>';
|
||||||
print '<span class="buttonpaymentsmall">'.$langs->trans("CreditOrDebitCard").'</span>';
|
print '<span class="buttonpaymentsmall">'.$langs->trans("CreditOrDebitCard").'</span>';
|
||||||
print '</div>';
|
print '</div>';
|
||||||
|
print '<script>
|
||||||
|
$( document ).ready(function() {
|
||||||
|
$("#div_dopayment_stripe").click(function(){
|
||||||
|
$("#dopayment_stripe").click();
|
||||||
|
});
|
||||||
|
$("#dopayment_stripe").click(function(e){
|
||||||
|
$("#div_dopayment_stripe").css( \'cursor\', \'wait\' );
|
||||||
|
e.stopPropagation();
|
||||||
|
return true;
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
';
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((empty($paymentmethod) || $paymentmethod == 'paypal') && ! empty($conf->paypal->enabled))
|
if ((empty($paymentmethod) || $paymentmethod == 'paypal') && ! empty($conf->paypal->enabled))
|
||||||
{
|
{
|
||||||
if (empty($conf->global->PAYPAL_API_INTEGRAL_OR_PAYPALONLY)) $conf->global->PAYPAL_API_INTEGRAL_OR_PAYPALONLY='integral';
|
if (empty($conf->global->PAYPAL_API_INTEGRAL_OR_PAYPALONLY)) $conf->global->PAYPAL_API_INTEGRAL_OR_PAYPALONLY='integral';
|
||||||
|
|
||||||
print '<br><div class="button buttonpayment"><span class="fa fa-paypal"></span> <input class="" type="submit" name="dopayment_paypal" value="'.$langs->trans("PaypalDoPayment").'">';
|
print '<br><div class="button buttonpayment" id="div_dopayment_paypal"><span class="fa fa-paypal"></span> <input class="" type="submit" id="dopayment_paypal" name="dopayment_paypal" value="'.$langs->trans("PaypalDoPayment").'">';
|
||||||
if ($conf->global->PAYPAL_API_INTEGRAL_OR_PAYPALONLY == 'integral')
|
if ($conf->global->PAYPAL_API_INTEGRAL_OR_PAYPALONLY == 'integral')
|
||||||
{
|
{
|
||||||
print '<br>';
|
print '<br>';
|
||||||
@ -1718,6 +1743,19 @@ if ($action != 'dopayment')
|
|||||||
//print '<br><span class="buttonpaymentsmall">'.$langs->trans("PaypalAccount").'"></span>';
|
//print '<br><span class="buttonpaymentsmall">'.$langs->trans("PaypalAccount").'"></span>';
|
||||||
}
|
}
|
||||||
print '</div>';
|
print '</div>';
|
||||||
|
print '<script>
|
||||||
|
$( document ).ready(function() {
|
||||||
|
$("#div_dopayment_paypal").click(function(){
|
||||||
|
$("#dopayment_paypal").click();
|
||||||
|
});
|
||||||
|
$("#dopayment_paypal").click(function(e){
|
||||||
|
$("#div_dopayment_paypal").css( \'cursor\', \'wait\' );
|
||||||
|
e.stopPropagation();
|
||||||
|
return true;
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -147,6 +147,9 @@ input.buttonpayment, button.buttonpayment, div.buttonpayment {
|
|||||||
color: #fff;
|
color: #fff;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
}
|
}
|
||||||
|
div.buttonpayment input:focus {
|
||||||
|
color: #008;
|
||||||
|
}
|
||||||
.buttonpaymentsmall {
|
.buttonpaymentsmall {
|
||||||
font-size: 0.65em;
|
font-size: 0.65em;
|
||||||
padding-left: 5px;
|
padding-left: 5px;
|
||||||
|
|||||||
@ -376,6 +376,9 @@ div.buttonpayment input {
|
|||||||
color: #333;
|
color: #333;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
div.buttonpayment input:focus {
|
||||||
|
color: #008;
|
||||||
|
}
|
||||||
input.buttonpaymentcb {
|
input.buttonpaymentcb {
|
||||||
background-image: url(<?php echo dol_buildpath($path.'/theme/common/credit_card.png', 1) ?>);
|
background-image: url(<?php echo dol_buildpath($path.'/theme/common/credit_card.png', 1) ?>);
|
||||||
background-size: 26px;
|
background-size: 26px;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user