Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
Current implementation of commerce_elavon_request() only allow fields starting with 'ssl_' to be include in the request to Elavon. This will force merchant to define their custom fields start with 'ssl_' which is confusing with the SSL fields that already existed.
Current implementation:
foreach ($info as $key => $value) {
// Keep keys starting by ssl_.
if (strpos($key, 'ssl_') !== 0) {
continue;
}
$sanitized_key = check_plain($key);
$xmldata .= '<' . $sanitized_key . '>' . check_plain($value) . '</' . $sanitized_key . '>';
}
Proposed resolution
Remove the restriction.
foreach ($info as $key => $value) {
$sanitized_key = check_plain($key);
$xmldata .= '<' . $sanitized_key . '>' . check_plain($value) . '</' . $sanitized_key . '>';
}
Comment | File | Size | Author |
---|---|---|---|
#2 | allow-post-non-ssl-custom-fields-2807347-2.patch | 553 bytes | xlin1003 |
|
Comments
Comment #2
xlin1003 CreditAttribution: xlin1003 commentedHere is the patch to remove the 'ssl_' restriction.
Comment #4
wuinfo - Bill Wu CreditAttribution: wuinfo - Bill Wu for Wulei Info Technology Solutions commentedI think all the keys require to start with "ssl_" prefix. If that is right, it is necessary to have that check. Let me know if I am wrong and send me the latest related documentation from the vendor.
Comment #5
wuinfo - Bill Wu CreditAttribution: wuinfo - Bill Wu for Wulei Info Technology Solutions commented