| @@ -38,8 +38,28 @@ | ||
| 38 | 38 | { |
| 39 | 39 | return $this->description; |
| 40 | 40 | } |
| 41 | 41 | |
| 42 | + /** | |
| 43 | + * The gateway's built-in (raw, untranslated) default title/description — | |
| 44 | + * the value of the `$title`/`$description` property before any `__()` | |
| 45 | + * override. Used to tell whether a stored gateway-config value is an | |
| 46 | + * operator customization or just the persisted default: if it equals the | |
| 47 | + * default, the checkout should prefer the translated getTitle()/ | |
| 48 | + * getDescription() instead of the stored English string, so the label | |
| 49 | + * translates. (Subclasses override getTitle()/getDescription() to return | |
| 50 | + * a translated string, but the property stays the raw default.) | |
| 51 | + */ | |
| 52 | + public function getDefaultTitle(): string | |
| 53 | + { | |
| 54 | + return $this->title; | |
| 55 | + } | |
| 56 | + | |
| 57 | + public function getDefaultDescription(): string | |
| 58 | + { | |
| 59 | + return $this->description; | |
| 60 | + } | |
| 61 | + | |
| 42 | 62 | public function getIcon(): string |
| 43 | 63 | { |
| 44 | 64 | // If icon is a relative path (starts with /), convert to full URL |
| 45 | 65 | if (!empty($this->icon) && strpos($this->icon, 'http') !== 0) { |
| @@ -219,9 +239,9 @@ | ||
| 219 | 239 | * Check if gateway supports recurring payments |
| 220 | 240 | */ |
| 221 | 241 | public function supportsRecurring(): bool |
| 222 | 242 | { |
| 223 | - return in_array('recurring', $this->supports) || in_array('scheduled_payments', $this->supports); | |
| 243 | + return in_array('recurring', $this->supports, true); | |
| 224 | 244 | } |
| 225 | 245 | |
| 226 | 246 | /** |
| 227 | 247 | * Create a customer (default: not supported) |