Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 33 additions & 36 deletions com/alipay/ams/api/model/customer_belongs_to.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,32 +3,31 @@
class CustomerBelongsTo(Enum):
"""CustomerBelongsTo枚举类"""

RABBIT_LINE_PAY = "RABBIT_LINE_PAY"
TRUEMONEY = "TRUEMONEY"
ALIPAY_HK = "ALIPAY_HK"
TNG = "TNG"
ALIPAY_CN = "ALIPAY_CN"
GCASH = "GCASH"
ALIPAY_HK = "ALIPAY_HK"
MPAY = "MPAY"
DANA = "DANA"
KAKAOPAY = "KAKAOPAY"
BKASH = "BKASH"
EASYPAISA = "EASYPAISA"
PAYPAY = "PAYPAY"
BOOST = "BOOST"
TNG = "TNG"
GRABPAY_MY = "GRABPAY_MY"
HIPAY = "HIPAY"
GCASH = "GCASH"
MAYA = "MAYA"
GRABPAY_PH = "GRABPAY_PH"
GRABPAY_SG = "GRABPAY_SG"
KAKAOPAY = "KAKAOPAY"
NAVERPAY = "NAVERPAY"
JKOPAY = "JKOPAY"
TOSSPAY = "TOSSPAY"
RABBIT_LINE_PAY = "RABBIT_LINE_PAY"
TRUEMONEY = "TRUEMONEY"
KPLUS = "KPLUS"
DIRECT_DEBIT_SIAMCOMMERCIALBANK = "DIRECT_DEBIT_SIAMCOMMERCIALBANK"
DIRECT_DEBIT_KRUNGTHAIBANK = "DIRECT_DEBIT_KRUNGTHAIBANK"
ACH_DIRECT_DEBIT = "ACH_DIRECT_DEBIT"
ZALOPAY = "ZALOPAY"
DIRECTDEBIT_YAPILY = "DIRECTDEBIT_YAPILY"
TOSSPAY = "TOSSPAY"
MOMO = "MOMO"
ANTOM_BIZ_ACCOUNT = "ANTOM_BIZ_ACCOUNT"
VIETTELMONEY = "VIETTELMONEY"

def to_ams_dict(self) -> str:
return self.name
Expand All @@ -38,56 +37,54 @@ def value_of(value):
if not value:
return None

if CustomerBelongsTo.RABBIT_LINE_PAY.value == value:
return CustomerBelongsTo.RABBIT_LINE_PAY
if CustomerBelongsTo.TRUEMONEY.value == value:
return CustomerBelongsTo.TRUEMONEY
if CustomerBelongsTo.ALIPAY_HK.value == value:
return CustomerBelongsTo.ALIPAY_HK
if CustomerBelongsTo.TNG.value == value:
return CustomerBelongsTo.TNG
if CustomerBelongsTo.ALIPAY_CN.value == value:
return CustomerBelongsTo.ALIPAY_CN
if CustomerBelongsTo.GCASH.value == value:
return CustomerBelongsTo.GCASH
if CustomerBelongsTo.ALIPAY_HK.value == value:
return CustomerBelongsTo.ALIPAY_HK
if CustomerBelongsTo.MPAY.value == value:
return CustomerBelongsTo.MPAY
if CustomerBelongsTo.DANA.value == value:
return CustomerBelongsTo.DANA
if CustomerBelongsTo.KAKAOPAY.value == value:
return CustomerBelongsTo.KAKAOPAY
if CustomerBelongsTo.BKASH.value == value:
return CustomerBelongsTo.BKASH
if CustomerBelongsTo.EASYPAISA.value == value:
return CustomerBelongsTo.EASYPAISA
if CustomerBelongsTo.PAYPAY.value == value:
return CustomerBelongsTo.PAYPAY
if CustomerBelongsTo.BOOST.value == value:
return CustomerBelongsTo.BOOST
if CustomerBelongsTo.TNG.value == value:
return CustomerBelongsTo.TNG
if CustomerBelongsTo.GRABPAY_MY.value == value:
return CustomerBelongsTo.GRABPAY_MY
if CustomerBelongsTo.HIPAY.value == value:
return CustomerBelongsTo.HIPAY
if CustomerBelongsTo.GCASH.value == value:
return CustomerBelongsTo.GCASH
if CustomerBelongsTo.MAYA.value == value:
return CustomerBelongsTo.MAYA
if CustomerBelongsTo.GRABPAY_PH.value == value:
return CustomerBelongsTo.GRABPAY_PH
if CustomerBelongsTo.GRABPAY_SG.value == value:
return CustomerBelongsTo.GRABPAY_SG
if CustomerBelongsTo.KAKAOPAY.value == value:
return CustomerBelongsTo.KAKAOPAY
if CustomerBelongsTo.NAVERPAY.value == value:
return CustomerBelongsTo.NAVERPAY
if CustomerBelongsTo.JKOPAY.value == value:
return CustomerBelongsTo.JKOPAY
if CustomerBelongsTo.TOSSPAY.value == value:
return CustomerBelongsTo.TOSSPAY
if CustomerBelongsTo.RABBIT_LINE_PAY.value == value:
return CustomerBelongsTo.RABBIT_LINE_PAY
if CustomerBelongsTo.TRUEMONEY.value == value:
return CustomerBelongsTo.TRUEMONEY
if CustomerBelongsTo.KPLUS.value == value:
return CustomerBelongsTo.KPLUS
if CustomerBelongsTo.DIRECT_DEBIT_SIAMCOMMERCIALBANK.value == value:
return CustomerBelongsTo.DIRECT_DEBIT_SIAMCOMMERCIALBANK
if CustomerBelongsTo.DIRECT_DEBIT_KRUNGTHAIBANK.value == value:
return CustomerBelongsTo.DIRECT_DEBIT_KRUNGTHAIBANK
if CustomerBelongsTo.ACH_DIRECT_DEBIT.value == value:
return CustomerBelongsTo.ACH_DIRECT_DEBIT
if CustomerBelongsTo.ZALOPAY.value == value:
return CustomerBelongsTo.ZALOPAY
if CustomerBelongsTo.DIRECTDEBIT_YAPILY.value == value:
return CustomerBelongsTo.DIRECTDEBIT_YAPILY
if CustomerBelongsTo.TOSSPAY.value == value:
return CustomerBelongsTo.TOSSPAY
if CustomerBelongsTo.MOMO.value == value:
return CustomerBelongsTo.MOMO
if CustomerBelongsTo.ANTOM_BIZ_ACCOUNT.value == value:
return CustomerBelongsTo.ANTOM_BIZ_ACCOUNT
if CustomerBelongsTo.VIETTELMONEY.value == value:
return CustomerBelongsTo.VIETTELMONEY
return None
15 changes: 15 additions & 0 deletions com/alipay/ams/api/model/payment_result_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ def __init__(self):
self.__credential_type_used = None # type: str
self.__rrn = None # type: str
self.__user_authorization_status = None # type: str
self.__authorization_code = None # type: str


@property
Expand Down Expand Up @@ -308,6 +309,16 @@ def user_authorization_status(self):
@user_authorization_status.setter
def user_authorization_status(self, value):
self.__user_authorization_status = value
@property
def authorization_code(self):
"""
The authorization code returned by the payment channel upon successful authorization.
"""
return self.__authorization_code

@authorization_code.setter
def authorization_code(self, value):
self.__authorization_code = value



Expand Down Expand Up @@ -368,6 +379,8 @@ def to_ams_dict(self):
params['rrn'] = self.rrn
if hasattr(self, "user_authorization_status") and self.user_authorization_status is not None:
params['userAuthorizationStatus'] = self.user_authorization_status
if hasattr(self, "authorization_code") and self.authorization_code is not None:
params['authorizationCode'] = self.authorization_code
return params


Expand Down Expand Up @@ -431,3 +444,5 @@ def parse_rsp_body(self, response_body):
self.__rrn = response_body['rrn']
if 'userAuthorizationStatus' in response_body:
self.__user_authorization_status = response_body['userAuthorizationStatus']
if 'authorizationCode' in response_body:
self.__authorization_code = response_body['authorizationCode']
Loading