Pour quelqu'un d'autre à la recherche de cette fonctionnalité, voici ce que je faisais:
Pour remplacer les Magento 1.7.0.2 routines paypal j'ai copié
/app/code/core/Mage/Paypal/
à
/app/code/local/Mage/Paypal/
J'ai ensuite ajouté la méthode suivante pour /app/code/local/Mage/Paypal/Model/Ipn.php
protected function _changeUserGroup($group){
$invoice_id = $this->_request['invoice'];
// get the resource model
$resource = Mage::getSingleton('core/resource');
// retrieve the read connection
$read = $resource->getConnection('core_read');
// get the customer_id for the invoice from the database
$customer_id = (int) $read->fetchOne($read->select()->from('sales_flat_order','customer_id')->where("increment_id='$invoice_id'")->limit(1));
// retrieve the write connection
$write = $resource->getConnection('core_write');
// raw query
$query = "UPDATE customer_entity SET group_id = $group WHERE entity_id = $customer_id";
// execute the query
$write->query($query);
}
Vous pouvez ensuite appeler cette méthode à quelque point que vous voulez dans la procédure IPN en fonction de votre objectif. J'ai trouvé http://fishpig.co.uk/blog/direct-sql-queries-magento.html utile pour les appels de base de données.