Silverstripe - Swipestripe checkout error

215 views Asked by At

I am running a local silverstripe instance with swipestripe installed. I followed the manual installation of swipestripe found here but each time I try go to checkout I receive this error. I have installed the Cheque payment method as instructed

[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  /**

I have followed the instructions and placed the correct code in Mysite.yaml but cannot find a way to rectify this. Any help is greatly appreciated :)

1

There are 1 answers

2
spekulatius On BEST ANSWER

The factory tries to build the payment relevant classes. Have updated your composer json with

composer require frankmullenger/payment-cheque:dev-master

on the shell? Or downloaded the zip from https://github.com/frankmullenger/silverstripe-payment-cheque and unpacked it into a folder called payment-cheque?

I assume you updated the config and run /dev/build afterwards. If you