silverstripe / silverstripe-omnipay

Silverstripe integration with Omnipay PHP payments library.
BSD 3-Clause "New" or "Revised" License
39 stars 67 forks source link

[User Warning] Missing default for localisation key SilverStripe\Omnipay\Model\Payment.STATUS_ #219

Closed barrykeenan closed 1 month ago

barrykeenan commented 4 years ago

When displaying Payments in a ModelAdmin, Payment.php:238 causes error due to Missing localisation key:

    /**
     * Get the payment status. This will return a localized value if available.
     * @return string the payment status
     */
    public function getPaymentStatus()
    {
        // return _t('SilverStripe\Omnipay\Model\Payment.STATUS_' . strtoupper($this->Status), $this->Status);
        return $this->Status;
    }
wilr commented 1 month ago

Closing as I think this should be fixed - getPaymentStatus is wrapped in an if now at least!