Skip to content

Commit 239805a

Browse files
committed
支付、查询、支付结果通知新增卡相关信息字段
1 parent 0047edc commit 239805a

File tree

5 files changed

+73
-3
lines changed

5 files changed

+73
-3
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
## 1.4.3 - 2024-02-05
4+
* [#27](https://github.com/alipay/global-open-sdk-python/pull/27) feature-250205
5+
- 支付、查询、支付结果通知新增卡相关信息字段
6+
37
## 1.4.2 - 2024-01-22
48
* [#26](https://github.com/alipay/global-open-sdk-python/pull/26) feature-250122
59
- update promotionResults

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
```
22
Language:Python
33
Python version:2.7+
4-
Releass ^1.4.2
4+
Releass ^1.4.3
55
Copyright:Ant financial services group
66
```
77

com/alipay/ams/api/model/payment_result_info.py

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,12 @@ def __init__(self):
1515
self.__payment_method_region = None
1616
self.__three_dS_result = None # type: ThreeDSResult
1717
self.__credit_pay_plan = None
18+
self.__cardholder_name = None
19+
self.__cardB_bin = None
20+
self.__last_four = None
21+
self.__expiry_month = None
22+
self.__expiry_year = None
23+
1824

1925
@property
2026
def avs_result_raw(self):
@@ -104,6 +110,46 @@ def credit_pay_plan(self):
104110
def credit_pay_plan(self, value):
105111
self.__credit_pay_plan = value
106112

113+
@property
114+
def cardholder_name(self):
115+
return self.__cardholder_name
116+
117+
@cardholder_name.setter
118+
def cardholder_name(self, value):
119+
self.__cardholder_name = value
120+
121+
@property
122+
def cardB_bin(self):
123+
return self.__cardB_bin
124+
125+
@cardB_bin.setter
126+
def cardB_bin(self, value):
127+
self.__cardB_bin = value
128+
129+
@property
130+
def last_four(self):
131+
return self.__last_four
132+
133+
@last_four.setter
134+
def last_four(self, value):
135+
self.__last_four = value
136+
137+
@property
138+
def expiry_month(self):
139+
return self.__expiry_month
140+
141+
@expiry_month.setter
142+
def expiry_month(self, value):
143+
self.__expiry_month = value
144+
145+
@property
146+
def expiry_year(self):
147+
return self.__expiry_year
148+
149+
@expiry_year.setter
150+
def expiry_year(self, value):
151+
self.__expiry_year = value
152+
107153
def to_ams_dict(self):
108154
param = dict()
109155
if hasattr(self, 'avs_result_raw') and self.avs_result_raw:
@@ -128,6 +174,16 @@ def to_ams_dict(self):
128174
param['threeDSResult'] = self.three_dS_result
129175
if hasattr(self, 'credit_pay_plan') and self.credit_pay_plan:
130176
param['creditPayPlan'] = self.credit_pay_plan
177+
if hasattr(self, 'cardholder_name') and self.cardholder_name:
178+
param['cardholderName'] = self.cardholder_name
179+
if hasattr(self, 'cardB_bin') and self.cardB_bin:
180+
param['cardBin'] = self.cardB_bin
181+
if hasattr(self, 'last_four') and self.last_four:
182+
param['lastFour'] = self.last_four
183+
if hasattr(self, 'expiry_month') and self.expiry_month:
184+
param['expiryMonth'] = self.expiry_month
185+
if hasattr(self, 'expiry_year') and self.expiry_year:
186+
param['expiryYear'] = self.expiry_year
131187

132188
return param
133189

@@ -157,3 +213,13 @@ def parse_rsp_body(self, payment_result_info_body):
157213
self.three_dS_result = payment_result_info_body['threeDSResult']
158214
if 'creditPayPlan' in payment_result_info_body:
159215
self.credit_pay_plan = payment_result_info_body['creditPayPlan']
216+
if 'cardholderName' in payment_result_info_body:
217+
self.cardholder_name = payment_result_info_body['cardholderName']
218+
if 'cardBin' in payment_result_info_body:
219+
self.cardB_bin = payment_result_info_body['cardBin']
220+
if 'lastFour' in payment_result_info_body:
221+
self.last_four = payment_result_info_body['lastFour']
222+
if 'expiryMonth' in payment_result_info_body:
223+
self.expiry_month = payment_result_info_body['expiryMonth']
224+
if 'expiryYear' in payment_result_info_body:
225+
self.expiry_year = payment_result_info_body['expiryYear']

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[metadata]
22
name = global-alipay-sdk-python
3-
version = 1.4.2
3+
version = 1.4.3
44

55
[options]
66
packages = find:

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
AUTHOR = "guodong.wzj"
1313
AUTHOR_EMAIL = "[email protected]"
1414
URL = "https://github.com/alipay/global-open-sdk-python"
15-
VERSION = "1.4.2"
15+
VERSION = "1.4.3"
1616
'''
1717
only python2 need enum34、pytz
1818
'''

0 commit comments

Comments
 (0)