Hola de nuevo,
Retomando este hilo que me has recordado @ventura, no tengo claro que debo de eliminar del código de hookpaymentoptions. Me podéis ayudar please? Finalmente me decanto por no poner imágenes. No quiero llenar los apartados de imágenes y creo que sencillo da más seguridad.
Pego code:
public function hookPaymentOptions($params)
{
if (Module::isEnabled('braintreeofficial') && (int)Configuration::get('BRAINTREEOFFICIAL_ACTIVATE_PAYPAL')) {
return array();
}
$isoCountryDefault = Country::getIsoById(Configuration::get('PS_COUNTRY_DEFAULT'));
$payments_options = array();
$method = AbstractMethodPaypal::load();
switch ($this->paypal_method) {
case 'EC':
if ($method->isConfigured()) {
$paymentOptionsEc = $this->renderEcPaymentOptions($params);
$payments_options = array_merge($payments_options, $paymentOptionsEc);
if (Configuration::get('PAYPAL_API_CARD') && (in_array($isoCountryDefault, $this->countriesApiCartUnavailable) == false)) {
$payment_option = new PaymentOption();
$action_text = $this->l('Pay with debit or credit card');
$payment_option->setLogo(Media::getMediaPath(_PS_MODULE_DIR_ . $this->name . '/views/img/logo_card.png'));
$payment_option->setCallToActionText($action_text);
$payment_option->setModuleName($this->name);
$payment_option->setAction($this->context->link->getModuleLink($this->name, 'ecInit', array('credit_card' => '1'), true));
$payment_option->setAdditionalInformation($this->context->smarty->fetch('module:paypal/views/templates/front/payment_infos_card.tpl'));
$payments_options[] = $payment_option;
}
}
break;
case 'PPP':
if ($method->isConfigured()) {
$payment_option = new PaymentOption();
$action_text = $this->l('Pay with PayPal Plus');
if (Configuration::get('PAYPAL_API_ADVANTAGES')) {
$action_text .= ' | ' . $this->l('It\'s simple, fast and secure');
}
$payment_option->setCallToActionText($action_text);
$payment_option->setModuleName('paypal_plus');
try {
$this->context->smarty->assign('path', $this->_path);
$payment_option->setAdditionalInformation($this->context->smarty->fetch('module:paypal/views/templates/front/payment_ppp.tpl'));
} catch (Exception $e) {
die($e);
}
$payments_options[] = $payment_option;
if ((Configuration::get('PAYPAL_EXPRESS_CHECKOUT_SHORTCUT') || Configuration::get('PAYPAL_EXPRESS_CHECKOUT_SHORTCUT_CART')) && isset($this->context->cookie->paypal_pSc)) {
$payment_option = new PaymentOption();
$action_text = $this->l('Pay with paypal plus shortcut');
$payment_option->setCallToActionText($action_text);
$payment_option->setModuleName('paypal_plus_schortcut');
$payment_option->setAction($this->context->link->getModuleLink($this->name, 'pppValidation', array('short_cut' => '1'), true));
$payments_options[] = $payment_option;
}
}
break;
case 'MB':
if ($method->isConfigured() && in_array($this->context->currency->iso_code, $this->currencyMB)) {
if ((int)Configuration::get('PAYPAL_MB_EC_ENABLED')) {
$paymentOptionsEc = $this->renderEcPaymentOptions($params);
$payments_options = array_merge($payments_options, $paymentOptionsEc);
}
if ((int)Configuration::get('PAYPAL_API_CARD')) {
$payment_option = new PaymentOption();
$action_text = $this->l('Pay with credit or debit card');
$payment_option->setCallToActionText($action_text);
$payment_option->setModuleName('paypal_plus_mb');
try {
$this->context->smarty->assign('path', $this->_path);
$payment_option->setAdditionalInformation($this->context->smarty->fetch('module:paypal/views/templates/front/payment_mb.tpl'));
} catch (Exception $e) {
return;
}
$payments_options[] = $payment_option;
}
}
break;
}
return $payments_options;
}
GRACIAS de antemano!!