diff --git a/README.txt b/README.txt
old mode 100644
new mode 100755
diff --git a/assets/css/swish-payment-pending.css b/assets/css/swish-payment-pending.css
old mode 100644
new mode 100755
index e69de29..748f7f2
--- a/assets/css/swish-payment-pending.css
+++ b/assets/css/swish-payment-pending.css
@@ -0,0 +1,3 @@
+/**
+ * swish-payment-pending-css
+ */
diff --git a/assets/img/loading.gif b/assets/img/loading.gif
old mode 100644
new mode 100755
diff --git a/assets/js/swish-payment-pending.js b/assets/js/swish-payment-pending.js
old mode 100644
new mode 100755
diff --git a/composer.json b/composer.json
old mode 100644
new mode 100755
diff --git a/config/install/swish_payment.swishpayment.yml b/config/install/swish_payment.swishpayment.yml
old mode 100644
new mode 100755
diff --git a/modules/swish_payment_block/composer.json b/modules/swish_payment_block/composer.json
old mode 100644
new mode 100755
diff --git a/modules/swish_payment_block/config/install/swish_payment_block.swishpaymentblock.yml b/modules/swish_payment_block/config/install/swish_payment_block.swishpaymentblock.yml
old mode 100644
new mode 100755
diff --git a/modules/swish_payment_block/src/Form/SwishPaymentBlockForm.php b/modules/swish_payment_block/src/Form/SwishPaymentBlockForm.php
old mode 100644
new mode 100755
index fcb43aa..8c5adfa
--- a/modules/swish_payment_block/src/Form/SwishPaymentBlockForm.php
+++ b/modules/swish_payment_block/src/Form/SwishPaymentBlockForm.php
@@ -8,15 +8,13 @@ use Drupal\Core\Url;
 use Drupal\swish_payment\SwishClient;
 use Symfony\Component\HttpFoundation\RedirectResponse;
 
-
 /**
- * Class SwishPaymentBlockForm.
+ * Implements Swish Payment Block Form.
  *
  * @package Drupal\swish_payment_block\Form
  */
 class SwishPaymentBlockForm extends FormBase {
 
-
   /**
    * {@inheritdoc}
    */
@@ -27,14 +25,14 @@ class SwishPaymentBlockForm extends FormBase {
   /**
    * {@inheritdoc}
    */
-  public function buildForm(array $form, FormStateInterface $form_state, $options = null) {
+  public function buildForm(array $form, FormStateInterface $form_state, $options = NULL) {
     $form['cellphone_number'] = [
       '#type' => 'tel',
       '#title' => $this->t('Cellphone number'),
       '#description' => $this->t('Enter cellphone number to the device where Swish is installed'),
     ];
 
-    if(is_array($options) && is_numeric($options['amount']) && $options['amount'] > 0) {
+    if (is_array($options) && is_numeric($options['amount']) && $options['amount'] > 0) {
       $form['amount'] = [
         '#type' => 'hidden',
         '#value' => $options['amount'],
@@ -44,12 +42,12 @@ class SwishPaymentBlockForm extends FormBase {
       $form['amount'] = [
         '#type' => 'number',
         '#title' => $this->t('Amount'),
-        '#required' => true,
+        '#required' => TRUE,
         '#description' => $this->t('Enter amount to pay/donate here.'),
       ];
     }
 
-    if(is_array($options) && !empty($options['reference'])) {
+    if (is_array($options) && !empty($options['reference'])) {
       $form['ref'] = [
         '#type' => 'hidden',
         '#value' => $options['reference'],
@@ -63,7 +61,7 @@ class SwishPaymentBlockForm extends FormBase {
       ];
     }
 
-    if(is_array($options) && !empty($options['message'])) {
+    if (is_array($options) && !empty($options['message'])) {
       $form['message'] = [
         '#type' => 'hidden',
         '#value' => $options['message'],
@@ -71,18 +69,19 @@ class SwishPaymentBlockForm extends FormBase {
     }
 
     $form['submit'] = [
-        '#type' => 'submit',
-        '#value' => $this->t('Submit'),
+      '#type' => 'submit',
+      '#value' => $this->t('Submit'),
     ];
     return $form;
   }
 
   /**
-    * {@inheritdoc}
-    */
+   * {@inheritdoc}
+   */
   public function validateForm(array &$form, FormStateInterface $form_state) {
-    if(!SwishClient::validatePhoneNo($form_state->getValue('cellphone_number')))
-      $form_state->setErrorByName('cellphone_number', t('Enter a valid phone no.'));
+    if (!SwishClient::validatePhoneNo($form_state->getValue('cellphone_number'))) {
+      $form_state->setErrorByName('cellphone_number', $this->t('Enter a valid phone no.'));
+    }
     parent::validateForm($form, $form_state);
   }
 
@@ -98,17 +97,20 @@ class SwishPaymentBlockForm extends FormBase {
         $form_state->getValue('message')
       );
     $form_state->disableRedirect();
-    if($trans) {
+    if ($trans) {
       $form_state->setResponse(
         new RedirectResponse(
-          Url::fromRoute("swish_payment.callback_pending", ['trans_id' => $trans->getTransactionId()], ['https'=>TRUE, 'absolute'=>TRUE] )->toString())
+          Url::fromRoute("swish_payment.callback_pending",
+          ['trans_id' => $trans->getTransactionId()],
+          ['https' => TRUE, 'absolute' => TRUE])->toString())
         );
     }
     else {
       $form_state->setResponse(
         new RedirectResponse(
-          Url::fromRoute("swish_payment.callback_error", [], ['absolute'=>TRUE] )->toString())
+          Url::fromRoute("swish_payment.callback_error", [], ['absolute' => TRUE])->toString())
         );
     }
   }
+
 }
diff --git a/modules/swish_payment_block/src/Plugin/Block/SwishPaymentBlock.php b/modules/swish_payment_block/src/Plugin/Block/SwishPaymentBlock.php
old mode 100644
new mode 100755
index d33fec7..339cda1
--- a/modules/swish_payment_block/src/Plugin/Block/SwishPaymentBlock.php
+++ b/modules/swish_payment_block/src/Plugin/Block/SwishPaymentBlock.php
@@ -4,6 +4,8 @@ namespace Drupal\swish_payment_block\Plugin\Block;
 
 use Drupal\Core\Block\BlockBase;
 use Drupal\Core\Form\FormStateInterface;
+use Drupal\Core\Form\FormBuilderInterface;
+use Symfony\Component\DependencyInjection\ContainerInterface;
 
 /**
  * Provides a 'SwishPaymentBlock' block.
@@ -15,16 +17,44 @@ use Drupal\Core\Form\FormStateInterface;
  */
 class SwishPaymentBlock extends BlockBase {
 
+  /**
+   * Form builder will be used via Dependency Injection.
+   *
+   * @var \Drupal\Core\Form\FormBuilderInterface
+   */
+  protected $formBuilder;
+
+  /**
+   * Create function.
+   *
+   * @param \Symfony\Component\DependencyInjection\ContainerInterface $container
+   *   The container.
+   *
+   * @return static
+   *   Returns static
+   */
+  public static function create(ContainerInterface $container) {
+    return new static(
+      $container->get('current_user')
+    );
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function __construct(FormBuilderInterface $form_builder) {
+    $this->formBuilder = $form_builder;
+  }
 
   /**
    * {@inheritdoc}
    */
   public function defaultConfiguration() {
     return [
-         'amount' => 0,
-        ] + parent::defaultConfiguration();
+      'amount' => 0,
+    ] + parent::defaultConfiguration();
 
- }
+  }
 
   /**
    * {@inheritdoc}
@@ -65,8 +95,12 @@ class SwishPaymentBlock extends BlockBase {
    * {@inheritdoc}
    */
   public function build() {
-    $options = ['amount' =>$this->configuration['amount'], 'reference' => $this->configuration['ref'], 'message' => $this->configuration['message']];
-    $form = \Drupal::formBuilder()->getForm('Drupal\swish_payment_block\Form\SwishPaymentBlockForm', $options);
+    $options = [
+      'amount' => $this->configuration['amount'],
+      'reference' => $this->configuration['ref'],
+      'message' => $this->configuration['message'],
+    ];
+    $form = $this->formBuilder->getForm('Drupal\swish_payment_block\Form\SwishPaymentBlockForm', $options);
     $build = [];
     $build['swish_payment_block_amount']['#markup'] = '<p>' . $this->configuration['amount'] . '</p>';
     $build['swish_payment_block_form'] = $form;
diff --git a/modules/swish_payment_block/src/Tests/LoadTest.php b/modules/swish_payment_block/src/Tests/LoadTest.php
old mode 100644
new mode 100755
index 85ee0f9..441a807
--- a/modules/swish_payment_block/src/Tests/LoadTest.php
+++ b/modules/swish_payment_block/src/Tests/LoadTest.php
@@ -10,7 +10,7 @@ use Drupal\simpletest\WebTestBase;
  *
  * @group swish_payment_block
  */
-class LoadTest extends WebTestBase{
+class LoadTest extends WebTestBase {
 
   /**
    * Modules to enable.
diff --git a/modules/swish_payment_block/swish_payment_block.info.yml b/modules/swish_payment_block/swish_payment_block.info.yml
old mode 100644
new mode 100755
index e6f7d5c..8d13f89
--- a/modules/swish_payment_block/swish_payment_block.info.yml
+++ b/modules/swish_payment_block/swish_payment_block.info.yml
@@ -2,6 +2,7 @@ name: Swish Payment Block
 type: module
 description: Provides a block type that can be used to initiate Swish payments on pages
 core: 8.x
+core_version_requirement: ^8 || ^9
 package: Other
 dependencies:
-  - swish_payment
+  - drupal:swish_payment
diff --git a/modules/swish_payment_block/swish_payment_block.module b/modules/swish_payment_block/swish_payment_block.module
old mode 100644
new mode 100755
diff --git a/modules/swish_payment_block/templates/swish_payment_block.html.twig b/modules/swish_payment_block/templates/swish_payment_block.html.twig
old mode 100644
new mode 100755
index 91e43c8..95722bd
--- a/modules/swish_payment_block/templates/swish_payment_block.html.twig
+++ b/modules/swish_payment_block/templates/swish_payment_block.html.twig
@@ -1 +1 @@
-<!-- Add you custom twig html here -->
\ No newline at end of file
+<!-- Add you custom twig html here -->
diff --git a/src/Controller/CallbackController.php b/src/Controller/CallbackController.php
old mode 100644
new mode 100755
index c301d4c..50b4c18
--- a/src/Controller/CallbackController.php
+++ b/src/Controller/CallbackController.php
@@ -6,16 +6,46 @@ use Drupal\Core\Url;
 use Drupal\Core\Controller\ControllerBase;
 use Symfony\Component\HttpFoundation\JsonResponse;
 use Drupal\swish_payment\Entity\SwishTransaction;
+use Symfony\Component\DependencyInjection\ContainerInterface;
+use Symfony\Component\HttpFoundation\RequestStack;
 
 /**
- * Class CallbackController.
+ * Implements Callback Controller.
  *
  * @package Drupal\swish_payment\Controller
  */
 class CallbackController extends ControllerBase {
 
   /**
-   * Complete. This is called by Swish service provider top update payment status on our side.
+   * The request stack used to access request globals.
+   *
+   * @var \Symfony\Component\HttpFoundation\RequestStack
+   */
+  protected $requestStack;
+
+  /**
+   * Constructs a new CseV2ResultsController controller.
+   *
+   * @param \Symfony\Component\HttpFoundation\RequestStack $request_stack
+   *   The request stack.
+   */
+  public function __construct(RequestStack $request_stack) {
+    $this->requestStack = $request_stack;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public static function create(ContainerInterface $container) {
+    return new static(
+      $container->get('request_stack')
+    );
+  }
+
+  /**
+   * Complete. This is called by Swish service provider.
+   *
+   * Implemented to update payment status on our side.
    *
    * @return string
    *   Return Hello string.
@@ -23,8 +53,8 @@ class CallbackController extends ControllerBase {
   public function update() {
     $postdata = file_get_contents("php://input");
     $request = json_decode($postdata);
-    if($request->id) {
-      if($st = SwishTransaction::Load($request->id)) {
+    if ($request->id) {
+      if ($st = SwishTransaction::Load($request->id)) {
         $st->setErrorCode($request->errorCode);
         $st->setErrorMessage($request->errorMessage);
         $st->setPaymentReference($request->paymentReference);
@@ -34,25 +64,31 @@ class CallbackController extends ControllerBase {
         $st->save();
       }
     }
-    return new JsonResponse(true);
+    return new JsonResponse(TRUE);
   }
 
   /**
-   * Pending payment. This is the page that display the pengind payment information.
+   * Pending payment.
+   *
+   * This is the page that display the pengind payment information.
    *
    * @return string
    *   Return Hello string.
    */
   public function pending($trans_id) {
-    $destination = $_GET['destination'];
-    if(empty($destination))
+    $destination = $this->requestStack->getCurrentRequest()->query->get('destination');
+    if (empty($destination)) {
       $destination = Url::fromRoute("swish_payment.callback_complete", ['trans_id' => $trans_id])->toString();
+    }
     $loading = drupal_get_path('module', 'swish_payment') . '/assets/img/loading.gif';
     return [
       '#title' => $this->t('Waiting for payment'),
       '#attached' => [
         'library' => ['swish_payment/swish-payment-pending'],
-        'drupalSettings' => ['transactionId' => $trans_id, 'destination' => $destination],
+        'drupalSettings' => [
+          'transactionId' => $trans_id,
+          'destination' => $destination,
+        ],
       ],
       '#type' => 'markup',
       '#markup' => "<p>" . $this->t('Please open the Swish App and complete the payment.') . "</p><p><img src=\"/$loading\" class=\"swish-payment-loading\" /></p>",
@@ -60,15 +96,18 @@ class CallbackController extends ControllerBase {
   }
 
   /**
-   * Poll status. This is called from our pending page to see if the status has changed.
+   * Poll status.
+   *
+   * This is called from our pending page to see if the status has changed.
    *
    * @return string
    *   Return Hello string.
    */
   public function poll($trans_id) {
-    $return = ['status' => false ];
-    if($st = SwishTransaction::Load($trans_id))
+    $return = ['status' => FALSE];
+    if ($st = SwishTransaction::Load($trans_id)) {
       $return = $st->toArray();
+    }
     return new JsonResponse($return);
   }
 
@@ -99,4 +138,5 @@ class CallbackController extends ControllerBase {
       '#markup' => "<p>" . $this->t('Your Swish payment was completed successfully. Thanks!') . "</p>",
     ];
   }
+
 }
diff --git a/src/Entity/SwishTransaction.php b/src/Entity/SwishTransaction.php
old mode 100644
new mode 100755
index ee1d556..bc5b415
--- a/src/Entity/SwishTransaction.php
+++ b/src/Entity/SwishTransaction.php
@@ -59,9 +59,9 @@ class SwishTransaction extends ContentEntityBase implements SwishTransactionInte
    */
   public static function preCreate(EntityStorageInterface $storage_controller, array &$values) {
     parent::preCreate($storage_controller, $values);
-    $values += array(
+    $values += [
       'user_id' => \Drupal::currentUser()->id(),
-    );
+    ];
   }
 
   /**
@@ -244,7 +244,6 @@ class SwishTransaction extends ContentEntityBase implements SwishTransactionInte
     return $this;
   }
 
-
   /**
    * {@inheritdoc}
    */
@@ -291,7 +290,10 @@ class SwishTransaction extends ContentEntityBase implements SwishTransactionInte
   }
 
   /**
-   * @return JSON representation of the SwishTransaction.
+   * Implements toArray()
+   *
+   * @return JSON
+   *   Returns representation of the SwishTransaction.
    */
   public function toArray() {
     $arr = parent::toArray();
@@ -314,23 +316,6 @@ class SwishTransaction extends ContentEntityBase implements SwishTransactionInte
     return $arr;
   }
 
-
-
-  /**
-   * {@inheritdoc}
-   */
-//  public function isPublished() {
-//    return (bool) $this->getEntityKey('status');
-//  }
-
-  /**
-   * {@inheritdoc}
-   */
-//  public function setPublished($published) {
-//    $this->set('status', $published ? TRUE : FALSE);
-//    return $this;
-//  }
-
   /**
    * {@inheritdoc}
    */
@@ -338,11 +323,9 @@ class SwishTransaction extends ContentEntityBase implements SwishTransactionInte
 
   }
 
-
   /**
    * {@inheritdoc}
    */
-
   public static function baseFieldDefinitions(EntityTypeInterface $entity_type) {
     $fields = parent::baseFieldDefinitions($entity_type);
 
@@ -353,167 +336,165 @@ class SwishTransaction extends ContentEntityBase implements SwishTransactionInte
       ->setSetting('target_type', 'user')
       ->setSetting('handler', 'default')
       ->setTranslatable(TRUE)
-      ->setDisplayOptions('view', array(
+      ->setDisplayOptions('view', [
         'label' => 'hidden',
         'type' => 'author',
         'weight' => 0,
-      ))
-      ->setDisplayOptions('form', array(
+      ])
+      ->setDisplayOptions('form', [
         'type' => 'entity_reference_autocomplete',
         'weight' => 5,
-        'settings' => array(
+        'settings' => [
           'match_operator' => 'CONTAINS',
           'size' => '60',
           'autocomplete_type' => 'tags',
           'placeholder' => '',
-        ),
-      ))
+        ],
+      ])
       ->setDisplayConfigurable('form', TRUE)
       ->setDisplayConfigurable('view', TRUE);
 
     $fields['transaction_id'] = BaseFieldDefinition::create('string')
       ->setLabel(t('Translation ID'))
       ->setDescription(t('The ID of the Swish transaction entity.'))
-      ->setSettings(array(
+      ->setSettings([
         'max_length' => 50,
         'text_processing' => 0,
-      ))
+      ])
       ->setDefaultValue('')
-      ->setDisplayOptions('view', array(
+      ->setDisplayOptions('view', [
         'label' => 'above',
         'type' => 'string',
         'weight' => -4,
-      ))
-      ->setDisplayOptions('form', array(
+      ])
+      ->setDisplayOptions('form', [
         'type' => 'string_textfield',
         'weight' => -4,
-      ))
+      ])
       ->setDisplayConfigurable('form', TRUE)
       ->setDisplayConfigurable('view', TRUE);
 
     $fields['payee_payment_reference'] = BaseFieldDefinition::create('string')
       ->setLabel(t('Payee Payment Reference'))
       ->setDescription(t('This reference could be order id or similar.'))
-      ->setSettings(array(
+      ->setSettings([
         'max_length' => 50,
         'text_processing' => 0,
-      ))
+      ])
       ->setDefaultValue('')
-      ->setDisplayOptions('view', array(
+      ->setDisplayOptions('view', [
         'label' => 'above',
         'type' => 'string',
         'weight' => -4,
-      ))
-      ->setDisplayOptions('form', array(
+      ])
+      ->setDisplayOptions('form', [
         'type' => 'string_textfield',
         'weight' => -4,
-      ))
+      ])
       ->setDisplayConfigurable('form', TRUE)
       ->setDisplayConfigurable('view', TRUE);
 
     $fields['payment_reference'] = BaseFieldDefinition::create('string')
       ->setLabel(t('Payment Reference'))
-      ->setDescription(t('Payment reference, from the bank, of the payment that occurred based on the Payment request. '))
-      ->setSettings(array(
+      ->setDescription(t('Payment reference, from the bank, of the payment that occurred based on the Payment request.'))
+      ->setSettings([
         'max_length' => 50,
         'text_processing' => 0,
-      ))
+      ])
       ->setDefaultValue('')
-      ->setDisplayOptions('view', array(
+      ->setDisplayOptions('view', [
         'label' => 'above',
         'type' => 'string',
         'weight' => -4,
-      ))
-      ->setDisplayOptions('form', array(
+      ])
+      ->setDisplayOptions('form', [
         'type' => 'string_textfield',
         'weight' => -4,
-      ))
+      ])
       ->setDisplayConfigurable('form', TRUE)
       ->setDisplayConfigurable('view', TRUE);
 
     $fields['payer_alias'] = BaseFieldDefinition::create('string')
       ->setLabel(t('Payer Alias'))
-      ->setDescription(t('The registered Cell phone number of the person that makes the payment. '))
-      ->setSettings(array(
+      ->setDescription(t('The registered Cell phone number of the person that makes the payment.'))
+      ->setSettings([
         'min_length' => 8,
         'max_length' => 15,
         'text_processing' => 0,
-      ))
+      ])
       ->setDefaultValue('')
-      ->setDisplayOptions('view', array(
+      ->setDisplayOptions('view', [
         'label' => 'above',
         'type' => 'string',
         'weight' => -4,
-      ))
-      ->setDisplayOptions('form', array(
+      ])
+      ->setDisplayOptions('form', [
         'type' => 'string_textfield',
         'weight' => -4,
-      ))
+      ])
       ->setDisplayConfigurable('form', TRUE)
       ->setDisplayConfigurable('view', TRUE);
 
     $fields['message'] = BaseFieldDefinition::create('string')
       ->setLabel(t('Message'))
       ->setDescription(t('Merchant supplied message about the payment/order.'))
-      ->setSettings(array(
+      ->setSettings([
         'max_length' => 50,
         'text_processing' => 0,
-      ))
+      ])
       ->setDefaultValue('')
-      ->setDisplayOptions('view', array(
+      ->setDisplayOptions('view', [
         'label' => 'above',
         'type' => 'string',
         'weight' => -4,
-      ))
-      ->setDisplayOptions('form', array(
+      ])
+      ->setDisplayOptions('form', [
         'type' => 'string_textfield',
         'weight' => -4,
-      ))
+      ])
       ->setDisplayConfigurable('form', TRUE)
       ->setDisplayConfigurable('view', TRUE);
 
-
     $fields['amount'] = BaseFieldDefinition::create('decimal')
       ->setLabel(t('Amount'))
       ->setDescription(t('The amount in SEK'))
-      ->setSettings(array(
+      ->setSettings([
         'min' => 1,
         'max' => 99999999.99,
         'size' => "10,2",
-      ))
-      ->setDisplayOptions('view', array(
+      ])
+      ->setDisplayOptions('view', [
         'label' => 'above',
         'type' => 'numeric',
         'weight' => -4,
-        ))
-      ->setDisplayOptions('form', array(
+      ])
+      ->setDisplayOptions('form', [
         'type' => 'string_textfield',
         'weight' => -4,
-        ))
+      ])
       ->setDisplayConfigurable('form', TRUE)
       ->setDisplayConfigurable('view', TRUE);
 
     $fields['status'] = BaseFieldDefinition::create('string')
       ->setLabel(t('Status'))
       ->setDescription(t('The payment status'))
-      ->setSettings(array(
+      ->setSettings([
         'max_length' => 8,
         'text_processing' => 0,
-      ))
-      ->setDefaultValue(null)
-      ->setDisplayOptions('view', array(
+      ])
+      ->setDefaultValue(NULL)
+      ->setDisplayOptions('view', [
         'label' => 'above',
         'type' => 'string',
         'weight' => -4,
-      ))
-      ->setDisplayOptions('form', array(
+      ])
+      ->setDisplayOptions('form', [
         'type' => 'string_textfield',
         'weight' => -4,
-      ))
+      ])
       ->setDisplayConfigurable('form', TRUE)
       ->setDisplayConfigurable('view', TRUE);
 
-
     $fields['paid'] = BaseFieldDefinition::create('timestamp')
       ->setLabel(t('Date Paid'))
       ->setDescription(t('The time the payment was done.'));
@@ -521,67 +502,68 @@ class SwishTransaction extends ContentEntityBase implements SwishTransactionInte
     $fields['error_code'] = BaseFieldDefinition::create('string')
       ->setLabel(t('Error Code'))
       ->setDescription(t('A code indicating what type of error occurred.'))
-      ->setSettings(array(
+      ->setSettings([
         'max_length' => 16,
         'text_processing' => 0,
-      ))
-      ->setDefaultValue(null)
-      ->setDisplayOptions('view', array(
+      ])
+      ->setDefaultValue(NULL)
+      ->setDisplayOptions('view', [
         'label' => 'above',
         'type' => 'string',
         'weight' => -4,
-      ))
-      ->setDisplayOptions('form', array(
+      ])
+      ->setDisplayOptions('form', [
         'type' => 'string_textfield',
         'weight' => -4,
-      ))
+      ])
       ->setDisplayConfigurable('form', TRUE)
       ->setDisplayConfigurable('view', TRUE);
 
     $fields['error_message'] = BaseFieldDefinition::create('string')
       ->setLabel(t('Error Message'))
       ->setDescription(t('A descriptive error message.'))
-      ->setSettings(array(
+      ->setSettings([
         'max_length' => 255,
         'text_processing' => 0,
-      ))
-      ->setDefaultValue(null)
-      ->setDisplayOptions('view', array(
+      ])
+      ->setDefaultValue(NULL)
+      ->setDisplayOptions('view', [
         'label' => 'above',
         'type' => 'string',
         'weight' => -4,
-      ))
-      ->setDisplayOptions('form', array(
+      ])
+      ->setDisplayOptions('form', [
         'type' => 'string_textfield',
         'weight' => -4,
-      ))
+      ])
       ->setDisplayConfigurable('form', TRUE)
       ->setDisplayConfigurable('view', TRUE);
 
     $fields['additional_information'] = BaseFieldDefinition::create('string')
       ->setLabel(t('Additional information'))
       ->setDescription(t('Additional information about the error.'))
-      ->setSettings(array(
+      ->setSettings([
         'max_length' => 255,
         'text_processing' => 0,
-      ))
-      ->setDefaultValue(null)
-      ->setDisplayOptions('view', array(
+      ])
+      ->setDefaultValue(NULL)
+      ->setDisplayOptions('view', [
         'label' => 'above',
         'type' => 'string',
         'weight' => -4,
-      ))
-      ->setDisplayOptions('form', array(
+      ])
+      ->setDisplayOptions('form', [
         'type' => 'string_textfield',
         'weight' => -4,
-      ))
+      ])
       ->setDisplayConfigurable('form', TRUE)
       ->setDisplayConfigurable('view', TRUE);
 
-/*    $fields['status'] = BaseFieldDefinition::create('boolean')
-      ->setLabel(t('Publishing status'))
-      ->setDescription(t('A boolean indicating whether the Swish transaction is published.'))
-      ->setDefaultValue(TRUE);*/
+    /*    $fields['status'] = BaseFieldDefinition::create('boolean')
+    ->setLabel(t('Publishing status'))
+    ->setDescription(t('A boolean indicating whether the Swish
+    transaction is published.'))
+    ->setDefaultValue(TRUE);*/
 
     $fields['created'] = BaseFieldDefinition::create('created')
       ->setLabel(t('Created'))
diff --git a/src/Entity/SwishTransactionInterface.php b/src/Entity/SwishTransactionInterface.php
old mode 100644
new mode 100755
index 345816d..460d1b3
--- a/src/Entity/SwishTransactionInterface.php
+++ b/src/Entity/SwishTransactionInterface.php
@@ -9,11 +9,11 @@ use Drupal\user\EntityOwnerInterface;
 /**
  * Provides an interface for defining Swish transaction entities.
  *
+ * Add get/set methods for your configuration properties here.
+ *
  * @ingroup swish_payment
  */
-interface SwishTransactionInterface extends  ContentEntityInterface, EntityChangedInterface, EntityOwnerInterface {
-
-  // Add get/set methods for your configuration properties here.
+interface SwishTransactionInterface extends ContentEntityInterface, EntityChangedInterface, EntityOwnerInterface {
 
   /**
    * Gets the Swish transaction name.
diff --git a/src/Entity/SwishTransactionViewsData.php b/src/Entity/SwishTransactionViewsData.php
old mode 100644
new mode 100755
index 2388ad5..7aac739
--- a/src/Entity/SwishTransactionViewsData.php
+++ b/src/Entity/SwishTransactionViewsData.php
@@ -17,7 +17,6 @@ class SwishTransactionViewsData extends EntityViewsData {
 
     // Additional information for Views integration, such as table joins, can be
     // put here.
-
     return $data;
   }
 
diff --git a/src/Form/SwishPaymentForm.php b/src/Form/SwishPaymentForm.php
old mode 100644
new mode 100755
index 929cf8a..fc9bec9
--- a/src/Form/SwishPaymentForm.php
+++ b/src/Form/SwishPaymentForm.php
@@ -9,13 +9,12 @@ use Drupal\Core\Form\FormStateInterface;
 use Drupal\swish_payment\SwishClient;
 
 /**
- * Class SwishPaymentForm.
+ * Implements Swish Payment Form.
  *
  * @package Drupal\swish_payment\Form
  */
 class SwishPaymentForm extends FormBase {
 
-
   /**
    * {@inheritdoc}
    */
@@ -30,13 +29,13 @@ class SwishPaymentForm extends FormBase {
     $form['phone'] = [
       '#type' => 'tel',
       '#title' => $this->t('Cell number'),
-      '#required' => true,
+      '#required' => TRUE,
       '#description' => $this->t('Enter the phone number of payment device here.'),
     ];
     $form['amount'] = [
       '#type' => 'number',
       '#title' => $this->t('Amount'),
-      '#required' => true,
+      '#required' => TRUE,
       '#description' => $this->t('Enter amount to pay/donate here.'),
     ];
     $form['ref'] = [
@@ -50,19 +49,12 @@ class SwishPaymentForm extends FormBase {
       '#description' => $this->t('Enter a messsage here.'),
     ];
     $form['submit'] = [
-        '#type' => 'submit',
-        '#value' => $this->t('Submit'),
+      '#type' => 'submit',
+      '#value' => $this->t('Submit'),
     ];
     return $form;
   }
 
-  /**
-    * {@inheritdoc}
-    */
-  public function validateForm(array &$form, FormStateInterface $form_state) {
-    parent::validateForm($form, $form_state);
-  }
-
   /**
    * {@inheritdoc}
    */
@@ -75,17 +67,20 @@ class SwishPaymentForm extends FormBase {
         $form_state->getValue('message')
       );
     $form_state->disableRedirect();
-    if($trans) {
+    if ($trans) {
       $form_state->setResponse(
         new RedirectResponse(
-          Url::fromRoute("swish_payment.callback_pending", ['trans_id' => $trans->getTransactionId()], ['https'=>TRUE, 'absolute'=>TRUE] )->toString())
+          Url::fromRoute("swish_payment.callback_pending",
+          ['trans_id' => $trans->getTransactionId()],
+          ['https' => TRUE, 'absolute' => TRUE])->toString())
         );
     }
     else {
       $form_state->setResponse(
         new RedirectResponse(
-          Url::fromRoute("swish_payment.callback_error", [], ['absolute'=>TRUE] )->toString())
+          Url::fromRoute("swish_payment.callback_error", [], ['absolute' => TRUE])->toString())
         );
     }
   }
+
 }
diff --git a/src/Form/SwishSettingsForm.php b/src/Form/SwishSettingsForm.php
old mode 100644
new mode 100755
index b33f902..c509ff4
--- a/src/Form/SwishSettingsForm.php
+++ b/src/Form/SwishSettingsForm.php
@@ -1,9 +1,5 @@
 <?php
 
-/**
- * @file
- * Contains \Drupal\swish_payment\Form\SwishSettingsForm
- */
 namespace Drupal\swish_payment\Form;
 
 use Drupal\Core\Form\ConfigFormBase;
@@ -13,6 +9,24 @@ use Drupal\Core\Form\FormStateInterface;
  * Configure swish settings for this site.
  */
 class SwishSettingsForm extends ConfigFormBase {
+
+  /**
+   * The config factory.
+   *
+   * @var \Drupal\Core\Config\ConfigFactory
+   */
+  protected $configFactory;
+
+  /**
+   * Constructs a new InvocationMethodServiceManager object.
+   *
+   * @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory
+   *   The configuration factory.
+   */
+  public function __construct(ConfigFactoryInterface $config_factory) {
+    $this->configFactory = $config_factory;
+  }
+
   /**
    * {@inheritdoc}
    */
@@ -34,57 +48,57 @@ class SwishSettingsForm extends ConfigFormBase {
    */
   public function buildForm(array $form, FormStateInterface $form_state) {
     $config = $this->config('swish_payment.settings');
-    $form['payee_alias'] = array(
+    $form['payee_alias'] = [
       '#type' => 'textfield',
       '#title' => $this->t('Payee alias'),
       '#description' => $this->t('Enter your Swish number here.'),
       '#default_value' => $config->get('payee_alias'),
-      '#required' => true,
-    );
-    $form['private_key'] = array(
+      '#required' => TRUE,
+    ];
+    $form['private_key'] = [
       '#type' => 'textfield',
       '#title' => $this->t('Private key'),
       '#description' => $this->t('Path and filename to the private key file. Should reside outside if www-root if possible.'),
       '#default_value' => $config->get('private_key'),
-      '#required' => true,
-    );
-    $form['private_key_pw'] = array(
+      '#required' => TRUE,
+    ];
+    $form['private_key_pw'] = [
       '#type' => 'password',
       '#title' => $this->t('Private key password'),
       '#description' => $this->t('Password for the private key, if any.'),
       '#default_value' => $config->get('private_key_pw'),
-    );
-    $form['client_cert'] = array(
+    ];
+    $form['client_cert'] = [
       '#type' => 'textfield',
       '#title' => $this->t('Client cert'),
       '#description' => $this->t('Path and filename to the client cert file. Should reside outside if www-root if possible.'),
       '#default_value' => $config->get('client_cert'),
-      '#required' => true,
-    );
-    $form['client_cert_pw'] = array(
+      '#required' => TRUE,
+    ];
+    $form['client_cert_pw'] = [
       '#type' => 'password',
       '#title' => $this->t('Client cert password'),
       '#description' => $this->t('Password for the client certificate, if any.'),
       '#default_value' => $config->get('client_cert_pw'),
-    );
-    $form['ca_cert'] = array(
+    ];
+    $form['ca_cert'] = [
       '#type' => 'textfield',
       '#title' => $this->t('CA root cert'),
       '#description' => $this->t('Path and filename to the CA root cert file. Omit this and you must either import the CA on the server or disable CA verification belove.'),
       '#default_value' => $config->get('ca_cert'),
-    );
-    $form['disable_ca_verification'] = array(
+    ];
+    $form['disable_ca_verification'] = [
       '#type' => 'checkbox',
       '#title' => $this->t('Disable CA verification'),
       '#description' => $this->t('Check this to disable CA verification.'),
       '#default_value' => $config->get('disable_ca_verification'),
-    );
-    $form['live_mode'] = array(
+    ];
+    $form['live_mode'] = [
       '#type' => 'checkbox',
       '#title' => $this->t('Live mode'),
       '#description' => $this->t('Check this to call live server.'),
       '#default_value' => $config->get('live_mode'),
-    );
+    ];
     return parent::buildForm($form, $form_state);
   }
 
@@ -92,7 +106,7 @@ class SwishSettingsForm extends ConfigFormBase {
    * {@inheritdoc}
    */
   public function submitForm(array &$form, FormStateInterface $form_state) {
-    $config = \Drupal::service('config.factory')->getEditable('swish_payment.settings');
+    $config = $this->configFactory->getEditable('swish_payment.settings');
     $config
       ->set('payee_alias', $form_state->getValue('payee_alias'))
       ->set('private_key', $form_state->getValue('private_key'))
@@ -105,4 +119,5 @@ class SwishSettingsForm extends ConfigFormBase {
       ->save();
     parent::submitForm($form, $form_state);
   }
+
 }
diff --git a/src/Form/SwishTransactionDeleteForm.php b/src/Form/SwishTransactionDeleteForm.php
old mode 100644
new mode 100755
diff --git a/src/Form/SwishTransactionForm.php b/src/Form/SwishTransactionForm.php
old mode 100644
new mode 100755
index ae7b3a7..cb3695f
--- a/src/Form/SwishTransactionForm.php
+++ b/src/Form/SwishTransactionForm.php
@@ -16,11 +16,10 @@ class SwishTransactionForm extends ContentEntityForm {
    * {@inheritdoc}
    */
   public function buildForm(array $form, FormStateInterface $form_state) {
-    /* @var $entity \Drupal\swish_payment\Entity\SwishTransaction */
+    /** @var \Drupal\swish_payment\Entity\SwishTransaction $entity */
     $form = parent::buildForm($form, $form_state);
 
-    $entity = $this->entity;
-
+    // $entity = $this->entity;
     return $form;
   }
 
diff --git a/src/Form/SwishTransactionSettingsForm.php b/src/Form/SwishTransactionSettingsForm.php
old mode 100644
new mode 100755
index 8273b81..856817d
--- a/src/Form/SwishTransactionSettingsForm.php
+++ b/src/Form/SwishTransactionSettingsForm.php
@@ -6,7 +6,7 @@ use Drupal\Core\Form\FormBase;
 use Drupal\Core\Form\FormStateInterface;
 
 /**
- * Class SwishTransactionSettingsForm.
+ * Implements Swish Transaction Settings Form.
  *
  * @package Drupal\swish_payment\Form
  *
diff --git a/src/SwishClient.php b/src/SwishClient.php
old mode 100644
new mode 100755
index 405c060..26bfb1f
--- a/src/SwishClient.php
+++ b/src/SwishClient.php
@@ -1,50 +1,68 @@
 <?php
+
 namespace Drupal\swish_payment;
 
+use GuzzleHttp\Client;
 use Drupal\Core\Url;
-use GuzzleHttp\ClientInterface;
-use GuzzleHttp\Handler\CurlFactory;
 use GuzzleHttp\Handler\CurlHandler;
 use GuzzleHttp\HandlerStack;
-use Psr\Http\Message\ResponseInterface;
 use Drupal\swish_payment\Entity\SwishTransaction;
 
 /**
  * Class that handles calling Swish API.
- * http://www.payexpim.com/category/pxorder/
  *
- * @param boolean $testMode Decides if running testmode or not.
- * @param boolean $md5 set to true for MD5 hash algorithm, false for SHA1.
+ * Http://www.payexpim.com/category/pxorder/.
+ *
+ * @param boolean $testMode
+ * Decides if running testmode or not.
+ * @param boolean $md5
+ * set to true for MD5 hash algorithm, false for SHA1.
  */
 class SwishClient {
   const SWISH_PRODUCTION_URL = 'https://swicpc.bankgirot.se/swish-cpcapi/api/v1';
   const SWISH_TEST_URL = 'https://mss.swicpc.bankgirot.se/swish-cpcapi/api/v1';
 
   /**
+   * The baseurl.
+   *
    * @var string
    */
   private $baseURL;
 
   /**
+   * The client.
+   *
    * @var \GuzzleHttp\ClientInterface
    */
   private $client;
 
+  /**
+   * {@inheritdoc}
+   */
   public function __construct($client, $liveMode) {
     $this->client = $client;
     $this->baseURL = ($liveMode ? self::SWISH_PRODUCTION_URL : self::SWISH_TEST_URL);
   }
 
   /**
-   * @param string $payerAlias The mobile number of the payment device
-   * @param string $amount The amount in SEK
-   * @param string $payeePaymentReference Optional order ID or similar
-   * @param string $message Optional message to be shown in the app.
-   * @return SwishTransaction
+   * {@inheritdoc}
+   *
+   * @param string $payerAlias
+   *   The mobile number of the payment device.
+   * @param string $amount
+   *   The amount in SEK.
+   * @param string $payeePaymentReference
+   *   Optional order ID or similar.
+   * @param string $message
+   *   Optional message to be shown in the app.
+   *
+   * @return \Drupal\swish_payment\Entity\SwishTransaction
+   *   Returns SwishTransaction
    */
-  public function createPaymentRequest($payerAlias, $amount, $payeePaymentReference = null, $message = null) {
+  public function createPaymentRequest($payerAlias, $amount, $payeePaymentReference = NULL, $message = NULL) {
     try {
-      $callbackUrl = Url::fromRoute("swish_payment.callback_update", [], ['https'=>TRUE, 'absolute'=>TRUE])->toString();
+      $callbackUrl = Url::fromRoute("swish_payment.callback_update",
+      [], ['https' => TRUE, 'absolute' => TRUE])->toString();
       $config = \Drupal::config('swish_payment.settings');
       $payerAlias = self::normalizePhoneNo($payerAlias);
       $data = [
@@ -53,93 +71,111 @@ class SwishClient {
         "payerAlias" => $payerAlias,
         "payeeAlias" => $config->get('payee_alias'),
         "amount" => $amount,
-        "currency" => 'SEK', //SEK only, sorry guys.
+      // SEK only, sorry guys.
+        "currency" => 'SEK',
         "message" => $message,
       ];
 
       $response = $this->sendRequest('POST', '/paymentrequests', $data);
       $statusCode = $response->getStatusCode();
-      $trans = false;
-      if($statusCode == 201) {
-        $locationParts =  explode("/", reset($response->getHeader('Location')));
+      $trans = FALSE;
+      if ($statusCode == 201) {
+        $locationParts = explode("/", reset($response->getHeader('Location')));
         $transactionId = array_pop($locationParts);
         $trans = SwishTransaction::create();
         $trans->setTransactionId($transactionId);
         $trans->setPayeePaymentReference($payeePaymentReference);
         $trans->setPayerAlias($payerAlias);
-        if($message)
+        if ($message) {
           $trans->setMessage($message);
+        }
         $trans->setAmount($amount);
         $trans->setStatus('CREATED');
         $trans->save();
       }
       else {
-        drupal_set_message(t('Error !code', ['!code' => $statusCode]), 'error');
+        drupal_set_message($this->t('Error !code', ['!code' => $statusCode]), 'error');
         /*TODO: more error logging here*/
       }
       return $trans;
     }
-    catch(Exception $e) {
-      drupal_set_message(t('An error occured !e', ['!e' => $e->getMessage()]), 'error');
+    catch (Exception $e) {
+      drupal_set_message($this->t('An error occured !e', ['!e' => $e->getMessage()]), 'error');
       /*TODO: more error logging here*/
     }
-    return false;
+    return FALSE;
   }
 
   /**
-   * @param string $transactionId The transaction ID
-   * @return SwishTransaction
+   * Implements retrievePaymentRequest().
+   *
+   * @param string $transactionId
+   *   The transaction ID.
+   *
+   * @return \Drupal\swish_payment\Entity\SwishTransaction
+   *   Returns SwishTransaction.
    */
   public function retrievePaymentRequest($transactionId) {
     try {
-      $response = $this->sendRequest('GET', '/paymentrequests/'.$transactionId);
+      $response = $this->sendRequest('GET', '/paymentrequests/' . $transactionId);
       $statusCode = $response->getStatusCode();
-      $trans = false;
-      if($statusCode == 200) {
-        if($trans = SwishTransaction::Load($transactionId)) {
+      $trans = FALSE;
+      if ($statusCode == 200) {
+        if ($trans = SwishTransaction::Load($transactionId)) {
           $data = json_decode($response->getBody());
-          if($data['paymentReference'])
+          if ($data['paymentReference']) {
             $trans->setPaymentReference($data['paymentReference']);
-          if($data['status'])
+          }
+          if ($data['status']) {
             $trans->setStatus($data['status']);
-          if($data['datePaid'])
+          }
+          if ($data['datePaid']) {
             $trans->setPaidTime(strtotime($data['datePaid']));
-          if($data['errorCode'])
+          }
+          if ($data['errorCode']) {
             $trans->setErrorCode($data['errorCode']);
-          if($data['errorMessage'])
+          }
+          if ($data['errorMessage']) {
             $trans->setErrorMessage($data['errorMessage']);
-          if($data['additionalInformation'])
+          }
+          if ($data['additionalInformation']) {
             $trans->setAdditionalInformation($data['additionalInformation']);
+          }
           $trans->save();
         }
         return $trans;
       }
       else {
-        drupal_set_message(t('Error !code', ['!code' => $statusCode]), 'error');
+        drupal_set_message($this->t('Error !code', ['!code' => $statusCode]), 'error');
       }
     }
-    catch(Exception $e) {
-      drupal_set_message(t('Some other error !e', ['!e' => $e->getMessage()]), 'error');
+    catch (Exception $e) {
+      drupal_set_message($this->t('Some other error !e', ['!e' => $e->getMessage()]), 'error');
     }
-    return false;
+    return FALSE;
   }
 
   /**
-  * @return SwishClient
-  */
-  public static function create()
-  {
+   * Implements create()
+   *
+   * @return SwishClient
+   *   Returns SwishClient.
+   */
+  public static function create() {
+
     $config = \Drupal::config('swish_payment.settings');
 
     $key = $config->get('private_key');
     $key_pw = $config->get('private_key_pw');
-    if($key_pw)
+    if ($key_pw) {
       $key = [$key, $key_pw];
+    }
 
     $cert = $config->get('client_cert');
     $cert_pw = $config->get('client_cert_pw');
-    if($cert_pw)
+    if ($cert_pw) {
       $cert = [$cert, $cert_pw];
+    }
 
     $liveMode = $config->get('live_mode');
 
@@ -147,54 +183,75 @@ class SwishClient {
     $root_ca = $config->get('ca_cert');
 
     $cconfig = [
-        'http_errors' => false,
-        'verify' => ($root_ca ? $root_ca : $ca_verification),
-        'cert' => $cert,
-        'ssl_key' => $key,
-        'handler' => HandlerStack::create(new CurlHandler()),
+      'http_errors' => FALSE,
+      'verify' => ($root_ca ? $root_ca : $ca_verification),
+      'cert' => $cert,
+      'ssl_key' => $key,
+      'handler' => HandlerStack::create(new CurlHandler()),
     ];
-    $guzzle = new \GuzzleHttp\Client($cconfig);
+    $guzzle = new Client($cconfig);
     return new SwishClient($guzzle, $liveMode);
   }
 
   /**
-   * @param string $method HTTP-method
-   * @param string $endpoint Service endpoint to be called
-   * @param mixed $data any json_encode accepted data
+   * Implements sendRequest()
+   *
+   * @param string $method
+   *   HTTP-method.
+   * @param string $endpoint
+   *   Service endpoint to be called.
+   * @param mixed $data
+   *   Any json_encode accepted data.
+   *
    * @return Guzzle\Http\Message\Response
+   *   Returns Response.
    */
-  protected function sendRequest($method, $endpoint, $data = null)
-  {
-    $return = false;
-    if($data)
+  protected function sendRequest($method, $endpoint, $data = NULL) {
+
+    $return = FALSE;
+    if ($data) {
       $return = $this->client->request($method, $this->baseURL . $endpoint, ['json' => $data]);
-    else
+    }
+    else {
       $return = $this->client->request($method, $this->baseURL . $endpoint);
+    }
     return $return;
   }
 
   /**
+   * Implements normalizePhoneNo()
+   *
    * @param string $phoneNo
+   *   The phone number.
+   *
    * @return string
+   *   Returns string.
    */
-  protected static function normalizePhoneNo($phoneNo)
-  {
+  protected static function normalizePhoneNo($phoneNo) {
+
     $phoneNo = preg_replace("/[^0-9]*/", "", $phoneNo);
-    if(strpos($phoneNo, "0") === 0)
+    if (strpos($phoneNo, "0") === 0) {
       $phoneNo = substr($phoneNo, 1);
-    if(strpos($phoneNo, "46") === FALSE)
-      $phoneNo = "46".$phoneNo;
+    }
+    if (strpos($phoneNo, "46") === FALSE) {
+      $phoneNo = "46" . $phoneNo;
+    }
     return $phoneNo;
   }
 
   /**
+   * Implements ValidatePhoneNo()
+   *
    * @param string $phoneNo
+   *   The phone number.
+   *
    * @return string
+   *   Returns string.
    */
-  public static function validatePhoneNo($phoneNo)
-  {
+  public static function validatePhoneNo($phoneNo) {
+
     $phoneNo = self::normalizePhoneNo($phoneNo);
-    return strlen($phoneNo)>=8 && strlen($phoneNo)<=15;
+    return strlen($phoneNo) >= 8 && strlen($phoneNo) <= 15;
   }
 
 }
diff --git a/src/SwishTransactionAccessControlHandler.php b/src/SwishTransactionAccessControlHandler.php
old mode 100644
new mode 100755
diff --git a/src/SwishTransactionHtmlRouteProvider.php b/src/SwishTransactionHtmlRouteProvider.php
old mode 100644
new mode 100755
diff --git a/src/SwishTransactionListBuilder.php b/src/SwishTransactionListBuilder.php
old mode 100644
new mode 100755
index 9eeb88a..c033d1b
--- a/src/SwishTransactionListBuilder.php
+++ b/src/SwishTransactionListBuilder.php
@@ -29,14 +29,14 @@ class SwishTransactionListBuilder extends EntityListBuilder {
    * {@inheritdoc}
    */
   public function buildRow(EntityInterface $entity) {
-    /* @var $entity \Drupal\swish_payment\Entity\SwishTransaction */
+    /** @var \Drupal\swish_payment\Entity\SwishTransaction $entity */
     $row['id'] = $entity->id();
     $row['transaction_id'] = $this->l(
       $entity->label(),
       new Url(
-        'entity.swish_transaction.edit_form', array(
+        'entity.swish_transaction.edit_form', [
           'swish_transaction' => $entity->id(),
-        )
+        ]
       )
     );
     return $row + parent::buildRow($entity);
diff --git a/src/Tests/LoadTest.php b/src/Tests/LoadTest.php
old mode 100644
new mode 100755
index 495ce06..2a5a9be
--- a/src/Tests/LoadTest.php
+++ b/src/Tests/LoadTest.php
@@ -10,7 +10,7 @@ use Drupal\simpletest\WebTestBase;
  *
  * @group swish_payment
  */
-class LoadTest extends WebTestBase{
+class LoadTest extends WebTestBase {
 
   /**
    * Modules to enable.
diff --git a/swish_payment.info.yml b/swish_payment.info.yml
old mode 100644
new mode 100755
index c290c6a..fb01ec4
--- a/swish_payment.info.yml
+++ b/swish_payment.info.yml
@@ -2,4 +2,5 @@ name: Swish Payment
 type: module
 description: Implement Swish Payment API
 core: 8.x
+core_version_requirement: ^8 || ^9
 package: Other
diff --git a/swish_payment.libraries.yml b/swish_payment.libraries.yml
old mode 100644
new mode 100755
diff --git a/swish_payment.links.action.yml b/swish_payment.links.action.yml
old mode 100644
new mode 100755
diff --git a/swish_payment.links.menu.yml b/swish_payment.links.menu.yml
old mode 100644
new mode 100755
diff --git a/swish_payment.links.task.yml b/swish_payment.links.task.yml
old mode 100644
new mode 100755
index 6856d04..58a872f
--- a/swish_payment.links.task.yml
+++ b/swish_payment.links.task.yml
@@ -19,4 +19,3 @@ entity.swish_transaction.delete_form:
   base_route:  entity.swish_transaction.canonical
   title: Delete
   weight: 10
-
diff --git a/swish_payment.module b/swish_payment.module
old mode 100644
new mode 100755
diff --git a/swish_payment.permissions.yml b/swish_payment.permissions.yml
old mode 100644
new mode 100755
diff --git a/swish_payment.routing.yml b/swish_payment.routing.yml
old mode 100644
new mode 100755
index d5588d5..a88d122
--- a/swish_payment.routing.yml
+++ b/swish_payment.routing.yml
@@ -48,5 +48,5 @@ swish_payment.swish_payment_form:
     _form: '\Drupal\swish_payment\Form\SwishPaymentForm'
     _title: 'Submit a Swish payment'
   requirements:
+  # Access given to all as it is a callback for Payment form.
     _access: 'TRUE'
-
diff --git a/swish_transaction.page.inc b/swish_transaction.page.inc
old mode 100644
new mode 100755
index 79cfe5b..b2e5b86
--- a/swish_transaction.page.inc
+++ b/swish_transaction.page.inc
@@ -21,8 +21,7 @@ use Drupal\Core\Render\Element;
  */
 function template_preprocess_swish_transaction(array &$variables) {
   // Fetch SwishTransaction Entity Object.
-  $swish_transaction = $variables['elements']['#swish_transaction'];
-
+  // $swish_transaction = $variables['elements']['#swish_transaction'];
   // Helpful $content variable for templates.
   foreach (Element::children($variables['elements']) as $key) {
     $variables['content'][$key] = $variables['elements'][$key];
diff --git a/templates/swish_transaction.html.twig b/templates/swish_transaction.html.twig
old mode 100644
new mode 100755
