我的php功能效果不佳:
public function authorize(Varien_Object $payment, $amount)
{
require_once Mage::getModuleDir('', 'Spectrocoin_Spectrocoin') . DS . 'lib' . DS . 'SCMerchantClient' . DS . 'SCMerchantClient.php';
$privateKeyFilePath = Mage::getBaseDir('media') . '/spectrocoin/keys/' . Mage::getStoreConfig('payment/Spectrocoin/private_key_file');
$merchantId = Mage::getStoreConfig('payment/Spectrocoin/merchant_id');
$appId = Mage::getStoreConfig('payment/Spectrocoin/app_id');
if (!file_exists($privateKeyFilePath) || !is_file($privateKeyFilePath)
|| !$merchantId || !$appId) {
echo 'Spectrocoin is not fully configured. Please select different payment';
exit;
}
直到if
我认为一切都很好,因为如果我粘贴出口直到if
它起作用但在if
之后没有任何作用我尝试退出,打印没有帮助...... / p>