function _uc_authorizenet_substr_between in Ubercart 8.4
Same name and namespace in other branches
- 5 payment/uc_authorizenet/uc_authorizenet.module \_uc_authorizenet_substr_between()
- 6.2 payment/uc_authorizenet/uc_authorizenet.module \_uc_authorizenet_substr_between()
- 7.3 payment/uc_authorizenet/uc_authorizenet.module \_uc_authorizenet_substr_between()
Helper function for parsing responses; adapted from sample PHP for ARB.
2 calls to _uc_authorizenet_substr_between()
- _uc_authorizenet_arb_parse_response in payment/
uc_authorizenet/ uc_authorizenet.module - Parses an Authorize.Net XML API response; from sample PHP for ARB.
- _uc_authorizenet_cim_parse_response in payment/
uc_authorizenet/ uc_authorizenet.module - Parses an Authorize.Net XML CIM API response.
File
- payment/
uc_authorizenet/ uc_authorizenet.module, line 300 - Processes payments using Authorize.net. Supports AIM and ARB.
Code
function _uc_authorizenet_substr_between($string, $element) {
$open = '<' . $element . '>';
$close = '</' . $element . '>';
// Fail if we can't find the open or close tag for the element.
if (strpos($string, $open) === FALSE || strpos($string, $close) === FALSE) {
return FALSE;
}
$start = strpos($string, $open) + strlen($open);
$end = strpos($string, $close);
return substr($string, $start, $end - $start);
}