【发布时间】:2014-10-14 00:01:53
【问题描述】:
我正在运行安装了 swipestripe 的本地 silverstripe 实例。我按照手动安装 swipestripe 找到了here 但每次我尝试去结账时都会收到这个错误。我已按照说明安装了支票付款方式
[User Error] Method Cheque not defined in factory
GET /checkout/
Line 50 in /Users/username/Sites/silverstripe/payment/code/PaymentProcessor.php
Source
41 * @return array
42 */
43 public static function get_supported_methods() {
44 $methodConfig = Config::inst()->get('PaymentProcessor', 'supported_methods');
45 $environment = PaymentGateway::get_environment();
46
47 // Check if all methods are defined in factory
48 foreach ($methodConfig[$environment] as $method) {
49 if (! PaymentFactory::get_factory_config($method)) {
50 user_error("Method $method not defined in factory", E_USER_ERROR);
51 }
52 }
53 return $methodConfig[$environment];
54 }
55
56 /**
我已按照说明在 Mysite.yaml 中放置了正确的代码,但找不到解决此问题的方法。非常感谢任何帮助:)
【问题讨论】: