Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Payment institution names inconsistent #24

Open
holtkamp opened this issue Nov 11, 2011 · 0 comments
Open

Payment institution names inconsistent #24

holtkamp opened this issue Nov 11, 2011 · 0 comments

Comments

@holtkamp
Copy link

For the various payment institutions (VISA, MasterCard, American Express, Banco do Brasil), an array is used in the ./lib/MoIP.php file:

private $institution = array('moip'=>'MoIP',
    'visa'=>'Visa',
    'american_express'=>'AmericanExpress',
    'mastercard'=>'Mastercard',
    'diners'=>'Diners',
    'banco_brasil'=>'BancoDoBrasil',
    'bradesco'=>'Bradesco',
    'itau'=>'Itau',
    'real'=>'BancoReal',
    'unibanco'=>'Unibanco',
    'aura'=>'Aura',
    'hipercard'=>'Hipercard',
    'paggo'=>'Paggo', //oi paggo
    'banrisul'=>'Banrisul'
);

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 = str_replace(' ', '_', $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)

Cheers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant