getValidPaymentMethods example

'countries' => \array_map(static fn (CountryEntity $country) => ['id' => $country->getId()]$validCountries),
        ]);

        $this->assignSalesChannelContext($this->browser);

        $this->contextPersister = $this->getContainer()->get(SalesChannelContextPersister::class);
        $this->orderRepository = $this->getContainer()->get('order.repository');
        $this->customerRepository = $this->getContainer()->get('customer.repository');
        $this->requestCriteriaBuilder = $this->getContainer()->get(RequestCriteriaBuilder::class);
        $this->email = Uuid::randomHex() . '@example.com';
        $this->customerId = Uuid::randomHex();
        $firstPaymentMethod = $this->getValidPaymentMethods()->first();
        static::assertNotNull($firstPaymentMethod);
        $this->defaultPaymentMethodId = $firstPaymentMethod->getId();
        $this->orderId = $this->createOrder($this->customerId, $this->email);

        $this->browser
            ->request(
                'POST',
                '/store-api/account/login',
                [],
                [],
                ['CONTENT_TYPE' => 'application/json'],
                
Home | Imprint | This part of the site doesn't use cookies.