Jump to content

Urgent Svp / Installer Masterpass ?


Recommended Posts

Bonjour

 

Je voudrais savoir comment faire pour installer le MasterPass sur un site prestashop v 1.6.0.14.

 

J'ai installé récemment le module Atos pour la BNP, j'ai activé le mode PayLib, mais pour  MasterPass je ne vois pas comment faire.

 

Dans la doc, j'ai :

Ajouter dans le champ "payment_means" de l'API le mot-clé MASTERPASS. Ceci a pour effet d'afficher le logo cliquable Masterpass (cf. exemple ci-dessous), payment_means="CB,2,VISA,2,MASTERCARD,2,MASTERPASS,2,AMEX,2 "

 

 

J'ai vu ce code dans atos.php mais j'ai un peu peur d'y toucher et si ca se trouve y a plus simple :)

 

$string = 'PAYMENT_MEANS!CB,2,VISA,2,MASTERCARD,2!';
if ($amex === 1 && $paylib === 1 && in_array($bank, $this->bank_paylib))
{
$data = Tools::file_get_contents($parcomedit);
$data = str_replace($string, 'PAYMENT_MEANS!CB,2,VISA,2,MASTERCARD,2,AMEX,2,PAYLIB,2!', $data);
file_put_contents($parcomedit, $data);
}
elseif ($paylib === 1 && in_array($bank, $this->bank_paylib))
{
$data = Tools::file_get_contents($parcomedit);
$data = str_replace($string, 'PAYMENT_MEANS!CB,2,VISA,2,MASTERCARD,2,PAYLIB,2!', $data);
file_put_contents($parcomedit, $data);
}
elseif ($amex === 1 || (!in_array($bank, $this->bank_paylib) && $amex !== 0))
{
$data = Tools::file_get_contents($parcomedit);
$data = str_replace($string, 'PAYMENT_MEANS!CB,2,VISA,2,MASTERCARD,2,AMEX,2!', $data);
file_put_contents($parcomedit, $data);
}
 
 

Merci beaucoup !!

Edited by loupiloop (see edit history)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...