BitBagCommerce /
SyliusBraintreePlugin
| 1 | <?php |
||
| 2 | |||
| 3 | declare(strict_types=1); |
||
| 4 | |||
| 5 | namespace BitBag\SyliusBraintreePlugin\Action\Api; |
||
| 6 | |||
| 7 | use BitBag\SyliusBraintreePlugin\Request\Api\FindPaymentMethodNonce; |
||
| 8 | use BitBag\SyliusBraintreePlugin\Request\Api\GenerateClientToken; |
||
| 9 | use Braintree\Exception\NotFound; |
||
| 10 | use Payum\Core\Exception\RequestNotSupportedException; |
||
| 11 | |||
| 12 | final class FindPaymentMethodNonceAction extends BaseApiAwareAction |
||
| 13 | { |
||
| 14 | public function execute($request): void |
||
| 15 | { |
||
| 16 | /** @var $request GenerateClientToken */ |
||
| 17 | RequestNotSupportedException::assertSupports($this, $request); |
||
| 18 | |||
| 19 | try { |
||
| 20 | $paymentMethodNonce = $this->api->findPaymentMethodNonce($request->getNonceString()); |
||
|
0 ignored issues
–
show
|
|||
| 21 | |||
| 22 | $request->setResponse($paymentMethodNonce); |
||
| 23 | } catch (NotFound $exception) { |
||
| 24 | return; |
||
| 25 | } |
||
| 26 | } |
||
| 27 | |||
| 28 | public function supports($request): bool |
||
| 29 | { |
||
| 30 | return $request instanceof FindPaymentMethodNonce; |
||
| 31 | } |
||
| 32 | } |
||
| 33 |
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.