Hi,
Thanks for the report.
Because your setting "invoice order statuses" is right configured, you can let the setting "order statuses for wallet transfer" empty.
It will avoid issues if you modify your HikaShop configuration in the future.
MangoPay have a setting "sandbox" in the Joomla part of the plugin ; and it have a setting "debug" when you create an instance of the payment method.
The "debug" is there to store information in the HikaShop payment log file. It can be useful to have some trace of what is happening.
During the event "onAfterOrderUpdate", the MangoPay plugin will check if the order is "confirm" and will then process the payment of the vendors.
If you take a look in the database, for the table "order" you will see a column named "order_payment_params". It contains serialized data for the payment and MangoPay is using it to store element like the "wallet id" and the different states (so he can know if the transfert already occurred or not).
There you can see the wallet ID used for the order but also the wallet ID for your vendors (stored in the sub orders).
Because you have the order marked as "paid" in the HikaShop backend, we know that MangoPay tried to do the transfer of money to the vendors.
If during a call to the MangoPay API there is an error ; the error message is stored in the HikaShop payment log (even if the debug is not activated).
Thanks to the data stored in the orders and the HikaShop payment log ; you should be able to know more about what is happening.
I made some test with my sandbox account and I was able to reproduce your issue and I had that message in the HikaShop payment log
Details: MangoPay\Error Object
(
[Message] => One or several required parameters are missing or incorrect. An incorrect resource ID also raises this kind of error.
[Errors] => stdClass Object
(
[Currency] => The code cannot be found in the standard ISO 4217 : http://en.wikipedia.org/wiki/ISO_4217
)
)
I check the MangoPay code in order to understand why the currency code was wrong/missing and I saw that there was some modifications in the order object provided by HikaShop.
In the file "plugins/hikashoppayment/mangopay/mangopay.php" file, please replace
if(!empty($order->order_currency_id)) {
$currencyClass = hikashop_get('class.currency');
$currencies = null;
$currencies = $currencyClass->getCurrencies($order->order_currency_id, $currencies);
$this->currency = $currencies[$order->order_currency_id];
}
By
$currency_id = (isset($order->order_currency_id) ? (int)$order->order_currency_id : (int)$order->old->order_currency_id);
if(!empty($currency_id)) {
$currencyClass = hikashop_get('class.currency');
$currencies = null;
$currencies = $currencyClass->getCurrencies($currency_id, $currencies);
$this->currency = $currencies[$currency_id];
}
So the currency will be loaded correctly even if the order object do not include that information.
Regards,