File tree Expand file tree Collapse file tree
java/com/midtrans/sample/controller
resources/templates/coreapi Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -42,6 +42,7 @@ public class CoreApiController {
4242 public ResponseEntity <String > charge (@ RequestBody Map <String , String > cc ) throws MidtransError {
4343 dataMockup .setPaymentType ("credit_card" );
4444 Map <String , String > creditCard = new HashMap <>(cc );
45+ creditCard .put ("authentication" , "true" );
4546 dataMockup .creditCard (creditCard );
4647 Map <String , Object > body = new HashMap <>(dataMockup .initDataMock ());
4748
Original file line number Diff line number Diff line change @@ -110,9 +110,6 @@ <h5><label id="address" th:text="${result.customer_details.billing_address.addre
110110 Credit card number is required
111111 </ div >
112112 </ div >
113- < input class ="authenticate_3ds " type ="checkbox " name ="authenticate_3ds " value ="true "
114- checked >
115- < label > 3D Secure</ label >
116113 </ div >
117114 </ div >
118115 < div class ="col-md-7 ">
@@ -179,8 +176,7 @@ <h5><label id="address" th:text="${result.customer_details.billing_address.addre
179176 fetch ( "/cards/charge" , {
180177 method : "POST" ,
181178 body : JSON . stringify ( {
182- "token_id" : response . token_id ,
183- "authentication" : document . querySelector ( '.authenticate_3ds' ) . checked
179+ "token_id" : response . token_id
184180 } ) ,
185181 headers : { 'Content-Type' : 'application/json' } ,
186182 } )
You can’t perform that action at this time.
0 commit comments