@akinon/pz-tabby-extension 2.0.22-rc.0 → 2.0.23-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +2 -5
- package/package.json +1 -1
- package/src/pages/TabbyPaymentGateway.tsx +7 -10
package/CHANGELOG.md
CHANGED
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
# @akinon/pz-tabby-extension
|
|
2
2
|
|
|
3
|
-
## 2.0.
|
|
3
|
+
## 2.0.23-beta.0
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
- a3e2acbf: ZERO-4487: ensure Tabby shipping_address city/address/zip are never empty
|
|
8
|
-
- c97525a3: ZERO-4487: derive Tabby order_history payment_method from payment type
|
|
5
|
+
## 2.0.22
|
|
9
6
|
|
|
10
7
|
## 2.0.21
|
|
11
8
|
|
package/package.json
CHANGED
|
@@ -67,9 +67,9 @@ export const TabbyPaymentGateway = async ({
|
|
|
67
67
|
salt,
|
|
68
68
|
hash,
|
|
69
69
|
shipping_address: {
|
|
70
|
-
city: preOrder?.pre_order?.shipping_address?.city?.name
|
|
71
|
-
address: preOrder?.pre_order?.shipping_address?.line
|
|
72
|
-
zip: preOrder?.pre_order?.shipping_address?.postcode
|
|
70
|
+
city: preOrder?.pre_order?.shipping_address?.city?.name,
|
|
71
|
+
address: preOrder?.pre_order?.shipping_address?.line,
|
|
72
|
+
zip: preOrder?.pre_order?.shipping_address?.postcode ?? '0'
|
|
73
73
|
},
|
|
74
74
|
order_items: preOrder?.pre_order?.basket?.basketitem_set?.map(
|
|
75
75
|
(item: any) => ({
|
|
@@ -93,10 +93,7 @@ export const TabbyPaymentGateway = async ({
|
|
|
93
93
|
orderHistory?.results?.map((order_history: any) => ({
|
|
94
94
|
purchased_at: order_history?.created_date,
|
|
95
95
|
amount: order_history?.amount,
|
|
96
|
-
payment_method:
|
|
97
|
-
order_history?.payment_option?.payment_type === 'pay_on_delivery'
|
|
98
|
-
? 'cod'
|
|
99
|
-
: 'card',
|
|
96
|
+
payment_method: order_history?.card === null ? 'cod' : 'card',
|
|
100
97
|
status: getOrderStatus(order_history?.status?.value),
|
|
101
98
|
buyer: {
|
|
102
99
|
phone: order_history?.billing_address?.phone_number,
|
|
@@ -104,9 +101,9 @@ export const TabbyPaymentGateway = async ({
|
|
|
104
101
|
name: `${order_history?.billing_address?.first_name} ${order_history?.billing_address?.last_name}`
|
|
105
102
|
},
|
|
106
103
|
shipping_address: {
|
|
107
|
-
city: order_history?.shipping_address?.city?.name
|
|
108
|
-
address: order_history?.shipping_address?.line
|
|
109
|
-
zip: order_history?.shipping_address?.postcode
|
|
104
|
+
city: order_history?.shipping_address?.city?.name,
|
|
105
|
+
address: order_history?.shipping_address?.line,
|
|
106
|
+
zip: order_history?.shipping_address?.postcode ?? '0'
|
|
110
107
|
},
|
|
111
108
|
order_items: groupByProductId(order_history?.orderitem_set)
|
|
112
109
|
})) ?? []
|