# API test button

**URL:** <https://forum.shopware.com/t/api-test-button/66835>\
**Category:** Programmierung\
**Created:** [10. Mai 2020 um 10:08 UTC](https://forum.shopware.com/t/api-test-button/66835 "2020-05-10T10:08:49Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![payzoff](https://avatars.discourse-cdn.com/v4/letter/p/ed655f/32.png) [@payzoff](https://forum.shopware.com/u/payzoff)\
**Post date:** [10. Mai 2020 um 10:08 UTC](https://forum.shopware.com/t/api-test-button/66835/1 "2020-05-10T10:08:49Z")

</div>

Hi, I am trying to implement a test button as refs here [https://developers.shopware.com/developers-guide/plugin-guidelines/#testing-communication-with-external-apis](https://developers.shopware.com/developers-guide/plugin-guidelines/#testing-communication-with-external-apis)

```
 Hallo, ich versuche hier einen Testknopf als Referenz zu implementieren [https://developers.shopware.com/developers-guide/plugin-guidelines/#testing-communication-with-external-apis](https://developers.shopware.com/developers-guide/plugin-guidelines/#testing-communication-with-external-apis)

 Here is my service file Hier ist meine Servicedatei 

```

&nbsp;

and

```
**MytestPaymentServices.php** 

```

&nbsp;

```
client = $client;
        $this->logger = $logger;

        parent::__construct();
    }

    public function testAction()
    {
        try {
            $response = $this->client->get(self::EXTERNAL_API_BASE_URL);

            if ((int) $response->getStatusCode() === Response::HTTP_OK) {
                $this->View()->assign('response', 'Success!');
            } else {
                $this->View()->assign('response', 'Oh no! Something went wrong :(');
            }
        } catch (RequestException $exception) {
            $this->logger->addError($exception->getMessage());

            $this->response->setStatusCode(Response::HTTP_INTERNAL_SERVER_ERROR);
            $this->View()->assign('response', $exception->getMessage());
        }
    }
}

```

but I get the following error

aber ich bekomme folgenden Fehler

```
Class Shopware_Controllers_Backend_MytestPaymentServices does not exist in engine/Library/Enlight/Hook/ProxyFactory.php on line 164

```

What do I do wrong?

Was mache ich falsch?

---

<div class="post-metadata">

**Author:** ![shyim](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/shyim/32/7681_2.png) [@shyim](https://forum.shopware.com/u/shyim)\
**Post date:** [10. Mai 2020 um 14:39 UTC](https://forum.shopware.com/t/api-test-button/66835/2 "2020-05-10T14:39:09Z")

</div>

Place your Controller in **Controller** /Backend/XXXX.php

**Controllers** name&nbsp;conflicting the other controller autoload
