@@ -117,12 +117,12 @@ to generate it dynamically too.
117117<form id =" paymentForm"
118118 method =" POST"
119119 action =" https://example.com/authorize" >
120- <input type =" text" name = " cardNumber " id =" cardNumber" placeholder =" cardNumber" />
121- <input type =" text" name = " expMonth " id =" expMonth" placeholder =" expMonth" />
122- <input type =" text" name = " expYear " id =" expYear" placeholder =" expYear" />
123- <input type =" text" name = " cardCode " id =" cardCode" placeholder =" cardCode" />
124- <input type =" hidden" name =" dataValue " id =" dataValue " />
125- <input type =" hidden" name =" dataDescriptor " id =" dataDescriptor " />
120+ <input type =" text" id =" cardNumber" placeholder =" cardNumber" />
121+ <input type =" text" id =" expMonth" placeholder =" expMonth" />
122+ <input type =" text" id =" expYear" placeholder =" expYear" />
123+ <input type =" text" id =" cardCode" placeholder =" cardCode" />
124+ <input type =" hidden" name =" opaqueDataValue " id =" opaqueDataValue " />
125+ <input type =" hidden" name =" opaqueDataDescriptor " id =" opaqueDataDescriptor " />
126126 <button >Pay Now</button >
127127</form >
128128```
@@ -152,7 +152,7 @@ will work. For example:
152152
153153The ` sendPaymentDataToAnet ` function handles the tokenisation.
154154
155- ```
155+ ``` javascript
156156< script type= " text/javascript" >
157157function sendPaymentDataToAnet () {
158158 // Set up authorisation to access the gateway.
@@ -207,16 +207,16 @@ Populate the opaque data hidden form items, then submit the form again:
207207
208208``` javascript
209209function paymentFormUpdate (opaqueData ) {
210- document .getElementById (" dataDescriptor " ).value = opaqueData .dataDescriptor ;
211- document .getElementById (" dataValue " ).value = opaqueData .dataValue ;
210+ document .getElementById (" opaqueDataDescriptor " ).value = opaqueData .dataDescriptor ;
211+ document .getElementById (" opaqueDataValue " ).value = opaqueData .dataValue ;
212212 document .getElementById (" paymentForm" ).submit ();
213213}
214214```
215215
216216Back at the server, you will have two opaque data fields to capture:
217217
218- * dataDescriptor
219- * dataValue
218+ * opaqueDataDescriptor
219+ * opaqueDataValue
220220
221221Initiate an ` authorize() ` or ` purchase() ` at the backend, as described in
222222the previous section. In the ` creditCard ` object, leave the card details
0 commit comments