Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/php
- <?php
- /**
- * Adding PHP include
- */
- set_include_path(get_include_path() . PATH_SEPARATOR . "/usr/local/mgr5/include/php");
- define('__MODULE__', "pmw1.php");
- require_once 'bill_util.php';
- /**
- * [$longopts description]
- * @var array
- */
- $longopts = array
- (
- "command:",
- "payment:",
- "amount:",
- );
- $options = getopt("", $longopts);
- /**
- * Processing --command
- */
- try {
- $command = $options['command'];
- Debug("command ". $options['command']);
- if ($command == "config") {
- $config_xml = simplexml_load_string($default_xml_string);
- $feature_node = $config_xml->addChild("feature");
- $feature_node->addChild("redirect", "on"); // If redirect supported
- $feature_node->addChild("notneedprofile", "on"); // If notneedprofile supported
- $feature_node->addChild("pmtune", "off");
- $feature_node->addChild("pmvalidate", "off");
- $feature_node->addChild("crvalidate", "off");
- $feature_node->addChild("crset", "on");
- $feature_node->addChild("crdelete", "off");
- $param_node = $config_xml->addChild("param");
- $param_node->addChild("payment_script", "/cgi/w1.php");
- echo $config_xml->asXML();
- } else {
- throw new Error("unknown command");
- }
- } catch (Exception $e) {
- echo $e;
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement