function uc_cybersource_hop_include in Ubercart 6.2
Same name and namespace in other branches
- 7.3 payment/uc_cybersource/uc_cybersource.module \uc_cybersource_hop_include()
5 calls to uc_cybersource_hop_include()
- uc_cybersource_hop_form in payment/
uc_cybersource/ uc_cybersource.module - Define values to be posted to CyberSource.
- uc_cybersource_hop_post in payment/
uc_cybersource/ uc_cybersource.module - uc_cybersource_requirements in payment/
uc_cybersource/ uc_cybersource.install - Implements hook_requirements().
- uc_cybersource_settings_form in payment/
uc_cybersource/ uc_cybersource.module - _uc_cybersource_post_charge in payment/
uc_cybersource/ uc_cybersource.module
File
- payment/
uc_cybersource/ uc_cybersource.module, line 187 - A module used for CyberSource's Silent Order POST and Hosted Order Page methods of payment.
Code
function uc_cybersource_hop_include() {
$hop_paths[0] = 'sites/all/libraries/uc_cybersource/HOP.php';
$hop_paths[1] = drupal_get_path('module', 'uc_cybersource') . '/HOP.php';
// Loop through possible paths, include and return TRUE when HOP.php is located.
foreach ($hop_paths as $key => $path) {
if (file_exists($path)) {
require_once $path;
return TRUE;
}
}
// We didn't find HOP.php in any of the possible paths.
return FALSE;
}