@@ -3,6 +3,7 @@ import { some } from 'lodash';
3
3
import {
4
4
BraintreeIntegrationService ,
5
5
isBraintreeAcceleratedCheckoutCustomer ,
6
+ BraintreePaymentProcessor ,
6
7
} from '@bigcommerce/checkout-sdk/braintree-utils' ;
7
8
import {
8
9
Address ,
@@ -62,9 +63,9 @@ export default class BraintreeCreditCardPaymentStrategy implements PaymentStrate
62
63
await this . braintreePaymentProcessor . initializeHostedForm (
63
64
braintree . form ,
64
65
braintree . unsupportedCardBrands ,
65
- ) ; // TODO: FIX
66
+ ) ;
66
67
this . isHostedFormInitialized =
67
- this . braintreePaymentProcessor . isInitializedHostedForm ( ) ; // TODO: FIX
68
+ this . braintreePaymentProcessor . isInitializedHostedForm ( ) ;
68
69
}
69
70
70
71
this . is3dsEnabled = this . paymentMethod . config . is3dsEnabled ;
@@ -89,7 +90,7 @@ export default class BraintreeCreditCardPaymentStrategy implements PaymentStrate
89
90
}
90
91
91
92
if ( this . isHostedFormInitialized ) {
92
- this . braintreePaymentProcessor . validateHostedForm ( ) ; // TODO: FIX
93
+ this . braintreePaymentProcessor . validateHostedForm ( ) ;
93
94
}
94
95
95
96
await this . paymentIntegrationService . submitOrder ( ) ;
@@ -117,14 +118,8 @@ export default class BraintreeCreditCardPaymentStrategy implements PaymentStrate
117
118
async deinitialize ( ) : Promise < void > {
118
119
this . isHostedFormInitialized = false ;
119
120
120
- // await Promise.all([
121
- // // this.braintreePaymentProcessor.deinitialize(), //TODO: FIX
122
- // this.braintreeIntegrationService.teardown(),
123
- // this.braintreePaymentProcessor.deinitializeHostedForm(), //TODO: FIX
124
- // ]);
125
-
126
- await this . braintreeIntegrationService . teardown ( ) ;
127
- await this . braintreePaymentProcessor . deinitializeHostedForm ( ) ; //TODO: FIX
121
+ await this . braintreeIntegrationService . teardown ( ) ;
122
+ await this . braintreePaymentProcessor . deinitializeHostedForm ( ) ;
128
123
129
124
return Promise . resolve ( ) ;
130
125
}
@@ -156,8 +151,8 @@ export default class BraintreeCreditCardPaymentStrategy implements PaymentStrate
156
151
isHostedInstrumentLike ( paymentData ) ? paymentData : { } ;
157
152
158
153
const { nonce } = this . shouldPerform3DSVerification ( payment )
159
- ? await this . braintreePaymentProcessor . verifyCard ( payment , billingAddress , orderAmount ) //TODO:FIX
160
- : await this . braintreePaymentProcessor . tokenizeCard ( payment , billingAddress ) ; //TODO: FIX
154
+ ? await this . braintreePaymentProcessor . verifyCard ( payment , billingAddress , orderAmount )
155
+ : await this . braintreePaymentProcessor . tokenizeCard ( payment , billingAddress ) ;
161
156
162
157
return {
163
158
...commonPaymentData ,
@@ -177,7 +172,7 @@ export default class BraintreeCreditCardPaymentStrategy implements PaymentStrate
177
172
178
173
if ( this . isSubmittingWithStoredCard ( payment ) ) {
179
174
const { nonce } =
180
- await this . braintreePaymentProcessor . tokenizeHostedFormForStoredCardVerification ( ) ; //TODO: FIX
175
+ await this . braintreePaymentProcessor . tokenizeHostedFormForStoredCardVerification ( ) ;
181
176
182
177
return {
183
178
...commonPaymentData ,
@@ -190,11 +185,11 @@ export default class BraintreeCreditCardPaymentStrategy implements PaymentStrate
190
185
isHostedInstrumentLike ( paymentData ) ? paymentData : { } ;
191
186
192
187
const { nonce } = this . shouldPerform3DSVerification ( payment )
193
- ? await this . braintreePaymentProcessor . verifyCardWithHostedForm ( //TODO: FIX
188
+ ? await this . braintreePaymentProcessor . verifyCardWithHostedForm (
194
189
billingAddress ,
195
190
orderAmount ,
196
191
)
197
- : await this . braintreePaymentProcessor . tokenizeHostedForm ( billingAddress ) ; //TODO: FIX
192
+ : await this . braintreePaymentProcessor . tokenizeHostedForm ( billingAddress ) ;
198
193
199
194
return {
200
195
...commonPaymentData ,
@@ -227,7 +222,7 @@ export default class BraintreeCreditCardPaymentStrategy implements PaymentStrate
227
222
}
228
223
229
224
const instrument = state . getCardInstrumentOrThrow ( paymentData . instrumentId ) ;
230
- const { nonce } = await this . braintreePaymentProcessor . challenge3DSVerification ( //TODO: FIX
225
+ const { nonce } = await this . braintreePaymentProcessor . challenge3DSVerification (
231
226
{
232
227
nonce : storedCreditCardNonce ,
233
228
bin : instrument . iin ,
0 commit comments