Currently, the client-side encryption works to append new values to the payment form via hidden form fields. This however still passes the unencrypted field values back to Drupal on submit, thereby nullifying PCI compliance. The values should be replaced with encrypted values rather than appended. The attached patch fixes this.
NB an #element_validate has to be employed to remove the encrypted values from $form_state['input'] so that any reload of the form (eg. validation errors) does not render the fields with encrypted values in them (which would then get encrypted again). A downside to this is that on any reload of the form, encrypted fields (credit card number & security code) must be re-entered.
| Comment | File | Size | Author |
|---|---|---|---|
| #9 | eway_integration_replace_values-2512532-8.patch | 4.76 KB | pandaski |
| #5 | Screen Shot 2015-08-19 at 7.10.37 pm.png | 27.38 KB | pandaski |
| #1 | eway_integration_replace_values-2512532-1.patch | 3.55 KB | bgilhome |
Comments
Comment #1
bgilhome commentedComment #2
pandaski commentedComment #3
pandaski commentedTotally agree with PCI compliance issue
Current release supports cardonfile module for token payment, however, it brings painful experience when we applying encrypted fields as other issues.
Maybe we should start thinking an eway token payment sub module or a different approach to support cardonfile module.
Quick thought here:
On another hand, we can remove commerce credit card and security code validation totally, and reply on eWay API to return error message after submit
Comment #4
pandaski commentedWe may need a js or PHP to clear field value when validation failed.
Comment #5
pandaski commentedComment #6
bgilhome commented@joseph-zhao thanks for your feedback. The custom element_validate callback eway_integration_commerce_dc_encrypted_element_validate() should be removing the values from $form_state['input'] for any redraw of the form, is it not working?
Comment #7
pandaski commented@bgilhome I am in a fresh installation, and as my screen shot, values are not removed after validation failed,
This error message is returned after form submitted, so we may need a hook for form redirection after submit?
thanks for quick feedback.
Comment #8
pandaski commentedGot it
line @199 with your patch
Comment #9
pandaski commentedA new patch - let us see if this one is good for testing
Comment #10
pandaski commentedComment #12
pandaski commentedComment #13
pandaski commented