Skip to content

Commit fe92ddc

Browse files
authored
Merge pull request #27 from alipay/feature-250205
支付、查询、支付结果通知新增卡相关信息字段
2 parents 0047edc + e0c3aa8 commit fe92ddc

File tree

6 files changed

+109
-3
lines changed

6 files changed

+109
-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/goods.py

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ def __init__(self):
1414
self.__goods_quantity = None
1515
self.__goods_sku_name = None
1616
self.__delivery_method_type = None # type:DeliveryMethodType
17+
self.__goods_url = None
18+
self.__goods_image_url = None
19+
self.__price_id = None
1720

1821
@property
1922
def reference_goods_id(self):
@@ -79,6 +82,30 @@ def delivery_method_type(self):
7982
def delivery_method_type(self, value):
8083
self.__delivery_method_type = value
8184

85+
@property
86+
def goods_url(self):
87+
return self.__goods_url
88+
89+
@goods_url.setter
90+
def goods_url(self, value):
91+
self.__goods_url = value
92+
93+
@property
94+
def goods_image_url(self):
95+
return self.__goods_image_url
96+
97+
@goods_image_url.setter
98+
def goods_image_url(self, value):
99+
self.__goods_image_url = value
100+
101+
@property
102+
def price_id(self):
103+
return self.__price_id
104+
105+
@price_id.setter
106+
def price_id(self, value):
107+
self.__price_id = value
108+
82109
def to_ams_dict(self):
83110
params = dict()
84111
if hasattr(self, "reference_goods_id") and self.reference_goods_id:
@@ -105,4 +132,13 @@ def to_ams_dict(self):
105132
if hasattr(self, "delivery_method_type") and self.delivery_method_type:
106133
params['deliveryMethodType'] = self.delivery_method_type
107134

135+
if hasattr(self, "goods_url") and self.goods_url:
136+
params['goodsUrl'] = self.goods_url
137+
138+
if hasattr(self, "goods_image_url") and self.goods_image_url:
139+
params['goodsImageUrl'] = self.goods_image_url
140+
141+
if hasattr(self, "price_id") and self.price_id:
142+
params['priceId'] = self.price_id
143+
108144
return params

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)