Jump to content

Ovveride MangoPay class[résolu]


Aodren
 Share

Recommended Posts

Bonjour,

I am new to Prestashop and i am trying to override a class inside the MangoPay module.

Je suis nouveau sur Prestashop et j'essaye d'override une classe dans le module MangoPay.

J'essaye donc de surcharger cette classe

modules/mangopayprestashop/classes/MangopayTransaction.php

J'ai donc créer ce fichier

modules/mangopayprestashop/override/classes/MangopayTransaction.php

J'ai fait un petit code de test

<?php

if (!defined('_PS_VERSION_'))
    exit;

class MangopayTransactionOverride extends MangopayTransaction
{
	public function transferMangoPayAmount($mgpDetails, $amount, $id_cart, $buyer_id_customer, $fee = 0)
	{
		$mgpDetails_ = array(
			'mgp_userid' => 81970663,
			'mgp_walletid' => 91197116
		);
		return parent::transferMangoPayAmount($mgpDetails_, $amount, $id_cart, $buyer_id_customer, $fee);
	}
}

?>

Mais rien ne ce passe, ce code n'est pas exécuté

Qu'est ce que je peux faire ?

Merci

Edited by Aodren
translate to french according to french forum rules (see edit history)

Share this post


Link to post
Share on other sites

Thanks for your answer but it still does not works.

I tried to upload the file into multiples location :

  • /override/classes
  • /override/classes/module/mangopayprestashop/classes
  • /modules/mangopayprestashop/override/classes

 

Share this post


Link to post
Share on other sites

  • 1 month later...

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
 Share

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More