Issue: Merchant account created inside Philippine will use PesoPay, created inside Thailand will use SiamPay, and created inside Indonesia will use BimoPay. Currently. only PayDollar is available. Cause: Missing PesoPay, SiamPay and BimoPay. Solution: Add a brand setting on payment provider to allow user to select which branch will be used. More: - What is PayDollar, PesoPay, etc. to AsiaPay? PayDollar, PesoPay, SiamPay, BimoPay is the same system under AsiaPay but is for different countries to apply. PesoPay is for the PH market SiamPay is for the TH market BimoPay is for the ID market while PayDollar is for all other market likes HK, CN, MO, TW, SG, MY, IN, VN, NZ and AU - Why are there multiple endpoints for a given API? Below reasons are from AsiaPay side Local regulators requirements for BimoPay Branding purposes to localize for the users for PesoPay and SiamPay. - Why didn't we integrate all these endpoints in the first version of our AsiaPay implementation? We got in touch with AsiaPay after our first integration. Therefore after partnership established with AsiaPay, they provide more integration guides on the whole development - If many customers ask for these endpoints? Right now, there is no customers asking for these endpoints. However if they register AsiaPay under certain countries, they have to use the other endpoints otherwise they will not able to use AsiaPay on Odoo at all. task-3073748 closes odoo/odoo#110357 Related: odoo/documentation#3423 Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
86 lines
2.1 KiB
Python
86 lines
2.1 KiB
Python
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
|
|
|
API_URLS = {
|
|
'production': {
|
|
'pesopay': 'https://www.pesopay.com/b2c2/eng/payment/payForm.jsp',
|
|
'siampay': 'https://www.siampay.com/b2c2/eng/payment/payForm.jsp',
|
|
'bimopay': 'https://www.bimopay.com/b2c2/eng/payment/payForm.jsp',
|
|
'paydollar': 'https://www.paydollar.com/b2c2/eng/payment/payForm.jsp',
|
|
},
|
|
'test': {
|
|
'pesopay': 'https://test.pesopay.com/b2cDemo/eng/payment/payForm.jsp',
|
|
'siampay': 'https://test.siampay.com/b2cDemo/eng/payment/payForm.jsp',
|
|
'paydollar': 'https://test.paydollar.com/b2cDemo/eng/payment/payForm.jsp',
|
|
}
|
|
}
|
|
|
|
# Mapping of currency ISO 4217 codes AsiaPay's currency codes.
|
|
# See https://www.paydollar.com/pdf/op/enpdintguide.pdf for the list of currency codes.
|
|
CURRENCY_MAPPING = {
|
|
'AED': '784',
|
|
'AUD': '036',
|
|
'BND': '096',
|
|
'CAD': '124',
|
|
'CNY': '156',
|
|
'EUR': '978',
|
|
'GBP': '826',
|
|
'HKD': '344',
|
|
'IDR': '360',
|
|
'INR': '356',
|
|
'JPY': '392',
|
|
'KRW': '410',
|
|
'MOP': '446',
|
|
'MYR': '458',
|
|
'NZD': '554',
|
|
'PHP': '608',
|
|
'SAR': '682',
|
|
'SGD': '702',
|
|
'THB': '764',
|
|
'TWD': '901',
|
|
'USD': '840',
|
|
'VND': '704',
|
|
}
|
|
|
|
# The keys of the values to use in the calculation of the signature.
|
|
SIGNATURE_KEYS = {
|
|
'outgoing': [
|
|
'merchant_id',
|
|
'reference',
|
|
'currency_code',
|
|
'amount',
|
|
'payment_type',
|
|
],
|
|
'incoming': [
|
|
'src',
|
|
'prc',
|
|
'successcode',
|
|
'Ref',
|
|
'PayRef',
|
|
'Cur',
|
|
'Amt',
|
|
'payerAuth',
|
|
],
|
|
}
|
|
|
|
# Mapping of both country codes (e.g., 'es') and IETF language tags (e.g.: 'fr-BE') to AsiaPay
|
|
# language codes. If a language tag is not listed, the country code prefix can serve as fallback.
|
|
LANGUAGE_CODES_MAPPING = {
|
|
'en': 'E',
|
|
'zh_HK': 'C',
|
|
'zh_TW': 'C',
|
|
'zh_CN': 'X',
|
|
'ja_JP': 'J',
|
|
'th_TH': 'T',
|
|
'fr': 'F',
|
|
'de': 'G',
|
|
'ru_RU': 'R',
|
|
'es': 'S',
|
|
'vi_VN': 'S',
|
|
}
|
|
|
|
# Mapping of transaction states to AsiaPay success codes.
|
|
SUCCESS_CODE_MAPPING = {
|
|
'done': ('0',),
|
|
'error': ('1',),
|
|
}
|