Note that the key => name mappings are not consisten. We have stored the names of the supported institutions in our database and would like to use:
$institutionKey = strreplace(' ', '', $institutionName); //replace spaces with underscores
$institutionKey = strtolower($institutionKey); //make the whole string lowercase
However, this approach fails for:
'Banco do Brasil'
'Banco Real'
'Oi Paggo'
I would like to suggest to add the following entries to the array:
'banco_do_brasil' => 'BancoBrasil'
'banco_real' => 'BancoReal'
'oi_paggo' => 'Paggo'
This way the client is consistent with general naming of the payment institutions and no changes to the MoIP engine are required, since the keys map to the same name (which is used in the request)
For the various payment institutions (VISA, MasterCard, American Express, Banco do Brasil), an array is used in the ./lib/MoIP.php file:
Note that the key => name mappings are not consisten. We have stored the names of the supported institutions in our database and would like to use: $institutionKey = strreplace(' ', '', $institutionName); //replace spaces with underscores $institutionKey = strtolower($institutionKey); //make the whole string lowercase
However, this approach fails for:
I would like to suggest to add the following entries to the array: 'banco_do_brasil' => 'BancoBrasil' 'banco_real' => 'BancoReal' 'oi_paggo' => 'Paggo'
This way the client is consistent with general naming of the payment institutions and no changes to the MoIP engine are required, since the keys map to the same name (which is used in the request)
Cheers