@jetthai/cuora 1.1.361-dev-5 → 1.1.361-dev-7
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 +4 -0
- package/package.json +1 -1
- package/src/api/payment.js +4 -0
- package/src/machine/bank_binding.js +44 -10
- package/src/machine/reward_cash.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [1.1.361-dev-7](https://github.com/jetthai/cuora-module/compare/v1.1.361-dev-6...v1.1.361-dev-7) (2025-06-19)
|
|
6
|
+
|
|
7
|
+
### [1.1.361-dev-6](https://github.com/jetthai/cuora-module/compare/v1.1.361-dev-5...v1.1.361-dev-6) (2025-06-19)
|
|
8
|
+
|
|
5
9
|
### [1.1.361-dev-5](https://github.com/jetthai/cuora-module/compare/v1.1.361-dev-4...v1.1.361-dev-5) (2025-06-17)
|
|
6
10
|
|
|
7
11
|
### [1.1.361-dev-4](https://github.com/jetthai/cuora-module/compare/v1.1.361-dev-3...v1.1.361-dev-4) (2025-06-17)
|
package/package.json
CHANGED
package/src/api/payment.js
CHANGED
|
@@ -19,6 +19,8 @@ export default {
|
|
|
19
19
|
lastNameTh,
|
|
20
20
|
firstNameEn,
|
|
21
21
|
lastNameEn,
|
|
22
|
+
firstNameLocal,
|
|
23
|
+
lastNameLocal,
|
|
22
24
|
bonus,
|
|
23
25
|
paymentProvider,
|
|
24
26
|
pixType,
|
|
@@ -41,6 +43,8 @@ export default {
|
|
|
41
43
|
lastNameTh,
|
|
42
44
|
firstNameEn,
|
|
43
45
|
lastNameEn,
|
|
46
|
+
firstNameLocal,
|
|
47
|
+
lastNameLocal,
|
|
44
48
|
bonus,
|
|
45
49
|
paymentProvider,
|
|
46
50
|
pixType,
|
|
@@ -27,6 +27,8 @@ export default function (request) {
|
|
|
27
27
|
branchCode: null,
|
|
28
28
|
accountNumber: null,
|
|
29
29
|
holderName: null,
|
|
30
|
+
lastNameLocal: null,
|
|
31
|
+
firstNameLocal: null,
|
|
30
32
|
pixType: null,
|
|
31
33
|
},
|
|
32
34
|
states: {
|
|
@@ -114,6 +116,20 @@ export default function (request) {
|
|
|
114
116
|
}
|
|
115
117
|
}),
|
|
116
118
|
},
|
|
119
|
+
SET_FIRST_NAME: {
|
|
120
|
+
actions: assign((context, event) => {
|
|
121
|
+
return {
|
|
122
|
+
firstNameLocal: event.data,
|
|
123
|
+
}
|
|
124
|
+
}),
|
|
125
|
+
},
|
|
126
|
+
SET_LAST_NAME: {
|
|
127
|
+
actions: assign((context, event) => {
|
|
128
|
+
return {
|
|
129
|
+
lastNameLocal: event.data,
|
|
130
|
+
}
|
|
131
|
+
}),
|
|
132
|
+
},
|
|
117
133
|
SET_PIX_TYPE: {
|
|
118
134
|
actions: assign((context, event) => {
|
|
119
135
|
return {
|
|
@@ -156,6 +172,8 @@ export default function (request) {
|
|
|
156
172
|
return {
|
|
157
173
|
hasAnyAccount: bankInfo.length > 0,
|
|
158
174
|
holderName: bankInfo[0]?.holderName,
|
|
175
|
+
firstNameLocal: bankInfo[0]?.firstNameLocal,
|
|
176
|
+
lastNameLocal: bankInfo[0]?.lastNameLocal,
|
|
159
177
|
paymentList,
|
|
160
178
|
bank: null, // 不預選銀行,玩家可能不知道這裡可以選 by Gordan
|
|
161
179
|
}
|
|
@@ -167,21 +185,21 @@ export default function (request) {
|
|
|
167
185
|
|
|
168
186
|
if (bindingType === 'CRYPTO') {
|
|
169
187
|
// 虛擬貨幣
|
|
170
|
-
const { crypto, network, cryptoAddress, holderName } = context
|
|
171
|
-
return crypto && network && cryptoAddress && holderName
|
|
188
|
+
const { crypto, network, cryptoAddress, holderName, firstNameLocal, lastNameLocal } = context
|
|
189
|
+
return crypto && network && cryptoAddress && (holderName || (firstNameLocal && lastNameLocal))
|
|
172
190
|
} else if (bindingType === 'EWALLET') {
|
|
173
191
|
// 電子錢包
|
|
174
|
-
const { walletCode, accountNumber, holderName } = context
|
|
175
|
-
return walletCode?.bankCode && accountNumber && holderName
|
|
192
|
+
const { walletCode, accountNumber, holderName, firstNameLocal, lastNameLocal } = context
|
|
193
|
+
return walletCode?.bankCode && accountNumber && (holderName || (firstNameLocal && lastNameLocal))
|
|
176
194
|
} else {
|
|
177
195
|
// 一般銀行
|
|
178
196
|
if (currency === 'INR') {
|
|
179
197
|
// 如果是印度幣別
|
|
180
|
-
const { bank, ifscCode, accountNumber, branch, holderName } = context
|
|
181
|
-
return bank.bankCode && ifscCode && accountNumber && branch && holderName
|
|
198
|
+
const { bank, ifscCode, accountNumber, branch, holderName, firstNameLocal, lastNameLocal } = context
|
|
199
|
+
return bank.bankCode && ifscCode && accountNumber && branch && (holderName || (firstNameLocal && lastNameLocal))
|
|
182
200
|
} else {
|
|
183
|
-
const { bank, accountNumber, branch, holderName } = context
|
|
184
|
-
return bank.bankCode && accountNumber && branch && holderName
|
|
201
|
+
const { bank, accountNumber, branch, holderName, firstNameLocal, lastNameLocal } = context
|
|
202
|
+
return bank.bankCode && accountNumber && branch && (holderName || (firstNameLocal && lastNameLocal))
|
|
185
203
|
}
|
|
186
204
|
}
|
|
187
205
|
},
|
|
@@ -195,8 +213,22 @@ export default function (request) {
|
|
|
195
213
|
return { paymentList, paymentInfo }
|
|
196
214
|
},
|
|
197
215
|
updatePaymentInfo: async (context, event) => {
|
|
198
|
-
const {
|
|
199
|
-
|
|
216
|
+
const {
|
|
217
|
+
bindingType,
|
|
218
|
+
bank,
|
|
219
|
+
ifscCode,
|
|
220
|
+
crypto,
|
|
221
|
+
network,
|
|
222
|
+
cryptoAddress,
|
|
223
|
+
walletCode,
|
|
224
|
+
branch,
|
|
225
|
+
branchCode,
|
|
226
|
+
accountNumber,
|
|
227
|
+
holderName,
|
|
228
|
+
firstNameLocal,
|
|
229
|
+
lastNameLocal,
|
|
230
|
+
pixType,
|
|
231
|
+
} = context
|
|
200
232
|
return await request.send(
|
|
201
233
|
payment.updatePaymentInfo({
|
|
202
234
|
bindingType,
|
|
@@ -210,6 +242,8 @@ export default function (request) {
|
|
|
210
242
|
branchCode,
|
|
211
243
|
bankAccount: accountNumber,
|
|
212
244
|
holderName,
|
|
245
|
+
firstNameLocal,
|
|
246
|
+
lastNameLocal,
|
|
213
247
|
pixType,
|
|
214
248
|
})
|
|
215
249
|
)
|