0

私は非常に奇妙なことを経験しています。開発サーバー(Mac Lion)でカスタム支払いモジュールを作成しました。開発サーバーでは、すべてが実際に完璧に機能します。ライブサイトに移動すると、バックエンド/管理者とフロントに表示されません。

私はそれに何時間も費やしましたが、それを理解することはできません。モジュールを事前にタブで確認して有効にできます。キャッシュをクリアしましたが、実際にはキャッシュも無効にしました。ここで何が悪いのかわかりません。私の開発サイトとライブサイトには、同じMagentoバージョン1.5.1があります。私はここに私のコードを含めているので、問題が何であるかを提案することを歓迎します。

config.xml

  <global>
    <models>
      <callpayment>
         <class>Bestdirect_CallPayment_Model</class>
      </callpayment>
    </models>
  </global>

 <default>
   <payment>
     <callpayment>
       <active>1</active>
       <model>callpayment/paymentMethod</model>
       <order_status>1</order_status>
       <title>ePayment</title>
       <payment_action>authorize_capture</payment_action>
    </callpayment>
  </payment>
 </default>

 <frontend>
   <routers>
    <callpayment>
        <use>standard</use>
        <args>
        <module>Bestdirect_CallPayment</module>
        <frontName>callpayment</frontName>
        </args>
    </callpayment>
  </routers>
 </frontend>

system.xml

<?xml version="1.0"?>
<config>
  <sections>
    <payment>
      <groups>
       <callpayment translate="label" module="paygate">
          <label>ePayment</label>
          <sort_order>670</sort_order>
          <show_in_default>1</show_in_default>
          <show_in_website>1</show_in_website>
          <show_in_store>0</show_in_store>
            <fields>
              <active translate="label">
                <label>Enabled</label>
                <frontend_type>select</frontend_type>
                <source_model>adminhtml/system_config_source_yesno</source_model>
                <sort_order>1</sort_order>
                <show_in_default>1</show_in_default>
                <show_in_website>1</show_in_website>
                <show_in_store>0</show_in_store>
              </active>
              <order_status translate="label">
                <label>New order status</label>
                <frontend_type>select</frontend_type>
                <source_model>adminhtml/system_config_source_order_status</source_model>
                <sort_order>4</sort_order>
                <show_in_default>1</show_in_default>
                <show_in_website>1</show_in_website>
                <show_in_store>0</show_in_store>
              </order_status>
             <allowspecific translate="label">
                <label>Payment from applicable countries</label>
                <frontend_type>allowspecific</frontend_type>
                <sort_order>50</sort_order>
       <source_model>adminhtml/system_config_source_payment_allspecificcountries</source_model>
                <show_in_default>1</show_in_default>
                <show_in_website>1</show_in_website>
                <show_in_store>1</show_in_store>
              </allowspecific>
              <specificcountry translate="label">
                <label>Payment from Specific countries</label>
                <frontend_type>multiselect</frontend_type>
                <sort_order>51</sort_order>
                <source_model>adminhtml/system_config_source_country</source_model>
                <show_in_default>1</show_in_default>
                <show_in_website>1</show_in_website>
                <show_in_store>1</show_in_store>
              </specificcountry>
              <title translate="label">
               <label>Title</label>
               <frontend_type>text</frontend_type>
               <sort_order>2</sort_order>
               <show_in_default>1</show_in_default>
               <show_in_website>1</show_in_website>
               <show_in_store>0</show_in_store>
              </title>
           </fields>
        </callpayment>
      </groups>
     </payment>
   </sections>
  </config>

PaymentMethod.php

  <?php
  require_once 'Bestdirect' . DS . 'Verkkomaksut_Module_Rest.php';

  class Bestdirect_CallPayment_Model_PaymentMethod extends Mage_Payment_Model_Method_Abstract
  {
    protected $_code  = 'callpayment';

    protected $_isInitializeNeeded      = true;
    protected $_canUseInternal          = false;
    protected $_canUseForMultishipping  = false;

public function capture(Varien_Object $payment, $amount) 
{
    $payment->getOrder()->setCanSendNewEmailFlag(false);
    return parent::capture($payment, $amount);
}

public function getOrderPlaceRedirectUrl()
{
    return Mage::getUrl('callpayment/standard/start', array('_secure' => true));
}

}

4

2 に答える 2

0

一見したところ、私の最初の質問は、実稼働環境の PHP 設定がライブラリinclude_pathを探す場所を認識しているかどうかを判断することです。Bestdirectステートメントはそのrequire_onceパスを使用し、ライブラリが見つからない場合は失敗します。おそらく無効になっているため、この失敗はおそらく本番サーバーではサイレントになりますdisplay_errors

于 2012-04-04T14:21:07.997 に答える
-1

これは古い質問であることは知っていますが、これは誰かを助けることができます. これはおそらく大文字/小文字のタイプミスです。Zero Cool のモジュール名は ですBestdirect_CallPaymentapp/etc/Bestdirect_CallPayment.xmlモジュール名を別の大文字と小文字の組み合わせ (例: Bestdirect_Callpayment) で入力すると、Mac では機能しますが、Linux では機能しません。これは、ファイル システムが大文字/小文字を処理する方法によるものです。それが役に立てば幸い!

于 2015-11-05T23:22:58.617 に答える