Skip to content
Code-Schnipsel Gruppen Projekte
Commit e9a7bf05 erstellt von Patrick Müller's avatar Patrick Müller
Dateien durchsuchen

Merge branch 'dev'

Übergeordnete b61d1564 7c8b0420
No related branches found
No related tags found
2 Merge Requests!6feat!: quiqqer v2,!5feat!: quiqqer v2
werden angezeigt mit 43 Ergänzungen und 23 Löschungen
......@@ -54,7 +54,11 @@ public static function onPaymentsCanUsedInOrder(Payment $Payment, OrderInterface
$B = new \Browser();
if (!$B->isMobile() || $PaymentType->getBrowserType() !== $B->getBrowser()) {
if (!$B->isMobile()) {
throw new PaymentCanNotBeUsedException();
}
if (!\in_array($B->getBrowser(), $PaymentType->getBrowserTypes())) {
throw new PaymentCanNotBeUsedException();
}
}
......
......@@ -34,9 +34,9 @@ public function getIcon()
/**
* Get type of Browser this BrowserPay works with
*
* @return string
* @return string[]
*/
abstract public function getBrowserType();
abstract public function getBrowserTypes();
/**
* Get type string of Stripe PaymentMethod
......
......@@ -73,11 +73,15 @@ public function getPaymentStepInfo()
/**
* Get type of Browser this BrowserPay works with
*
* @return string
* @return string[]
*/
public function getBrowserType()
public function getBrowserTypes()
{
return \Browser::BROWSER_SAFARI;
return [
\Browser::BROWSER_IPHONE,
\Browser::BROWSER_IPAD,
\Browser::BROWSER_SAFARI
];
}
/**
......
......@@ -73,11 +73,13 @@ public function getPaymentStepInfo()
/**
* Get type of Browser this BrowserPay works with
*
* @return string
* @return string[]
*/
public function getBrowserType()
public function getBrowserTypes()
{
return \Browser::BROWSER_CHROME;
return [
\Browser::BROWSER_CHROME
];
}
/**
......
......@@ -73,11 +73,13 @@ public function getPaymentStepInfo()
/**
* Get type of Browser this BrowserPay works with
*
* @return string
* @return string[]
*/
public function getBrowserType()
public function getBrowserTypes()
{
return \Browser::BROWSER_EDGE;
return [
\Browser::BROWSER_EDGE
];
}
/**
......
......@@ -14,9 +14,9 @@ abstract class AbstractRecurringBrowserPay extends AbstractBaseRecurringPayment
/**
* Get type of Browser this BrowserPay works with
*
* @return string
* @return string[]
*/
abstract public function getBrowserType();
abstract public function getBrowserTypes();
/**
* Get type string of Stripe PaymentMethod
......
......@@ -73,11 +73,15 @@ public function getPaymentStepInfo()
/**
* Get type of Browser this BrowserPay works with
*
* @return string
* @return string[]
*/
public function getBrowserType()
public function getBrowserTypes()
{
return \Browser::BROWSER_SAFARI;
return [
\Browser::BROWSER_IPHONE,
\Browser::BROWSER_IPAD,
\Browser::BROWSER_SAFARI
];
}
/**
......
......@@ -73,11 +73,13 @@ public function getPaymentStepInfo()
/**
* Get type of Browser this BrowserPay works with
*
* @return string
* @return string[]
*/
public function getBrowserType()
public function getBrowserTypes()
{
return \Browser::BROWSER_CHROME;
return [
\Browser::BROWSER_CHROME
];
}
/**
......
......@@ -73,11 +73,13 @@ public function getPaymentStepInfo()
/**
* Get type of Browser this BrowserPay works with
*
* @return string
* @return string[]
*/
public function getBrowserType()
public function getBrowserTypes()
{
return \Browser::BROWSER_EDGE;
return [
\Browser::BROWSER_EDGE
];
}
/**
......
0% oder .
You are about to add 0 people to the discussion. Proceed with caution.
Bearbeitung dieser Nachricht zuerst beenden!
Bitte registrieren oder zum Kommentieren