ArashDev Posted November 16, 2022 Share Posted November 16, 2022 I have a payment gateway that unfortunately does not work with php8 or higher. After selecting the payment method, I get a white screen error. To check this problem, I enabled error display and saw the following error: Fatal error: Declaration of IPS\nexus\Gateway\_zarinpal::checkValidity(IPS\nexus\Money $amount, ?IPS\GeoLocation $billingAddress = null, ?IPS\nexus\Customer $customer = null) must be compatible with IPS\nexus\_Gateway::checkValidity(IPS\nexus\Money $amount, ?IPS\GeoLocation $billingAddress = null, ?IPS\nexus\Customer $customer = null, $recurrings = []) in /home/smooksh1/test.smook.shop/applications/nexus/sources/Gateway/zarinpal/zarinpal.php on line 26 zarinpal.php how can I fix that? please help me When Love is real it finds away Link to comment Share on other sites More sharing options...
Manager Solution DawPi Posted November 16, 2022 Manager Solution Share Posted November 16, 2022 Change this: public function checkValidity( \IPS\nexus\Money $amount, \IPS\GeoLocation $billingAddress = NULL, \IPS\nexus\Customer $customer = NULL ) { To: /** * Check the gateway can process this... * * @param $amount \IPS\nexus\Money The amount * @param $billingAddress \IPS\GeoLocation|NULL The billing address, which may be NULL if one if not provided * @param $customer \IPS\nexus\Customer The customer (Default NULL value is for backwards compatibility - it should always be provided.) * @param array $recurrings Details about recurring costs * @return bool */ public function checkValidity( \IPS\nexus\Money $amount, \IPS\GeoLocation $billingAddress = NULL, \IPS\nexus\Customer $customer = NULL, $recurrings = array() ) { 1 intermedia - profesjonalne rozwiązania Invision Power Board --- Chcesz uzyskać szybko i sprawnie pomoc? Uzupełnij wersję i adres w profilu. Link to comment Share on other sites More sharing options...
ArashDev Posted November 16, 2022 Author Share Posted November 16, 2022 I did it. but now I got below error: Fatal error: Declaration of IPS\nexus\Gateway\_zarinpal::auth(IPS\nexus\Transaction $transaction, $values, ?IPS\nexus\Fraud\MaxMind\Request $maxMind = null, $recurrings = []) must be compatible with IPS\nexus\_Gateway::auth(IPS\nexus\Transaction $transaction, $values, ?IPS\nexus\Fraud\MaxMind\Request $maxMind = null, $recurrings = [], $source = null) in /home/smooksh1/test.smook.shop/applications/nexus/sources/Gateway/zarinpal/zarinpal.php on line 46 When Love is real it finds away Link to comment Share on other sites More sharing options...
ArashDev Posted November 16, 2022 Author Share Posted November 16, 2022 I solved with: /** * Authorize * * @param \IPS\nexus\Transaction $transaction Transaction * @param array|\IPS\nexus\Customer\CreditCard $values Values from form OR a stored card object if this gateway supports them * @param \IPS\nexus\Fraud\MaxMind\Request|NULL $maxMind *If* MaxMind is enabled, the request object will be passed here so gateway can additional data before request is made * @param array $recurrings Details about recurring costs * @param string|NULL $source 'checkout' if the customer is doing this at a normal checkout, 'renewal' is an automatically generated renewal invoice, 'manual' is admin manually charging. NULL is unknown * @return \IPS\DateTime|NULL Auth is valid until or NULL to indicate auth is good forever * @throws \LogicException Message will be displayed to user */ public function auth( \IPS\nexus\Transaction $transaction, $values, \IPS\nexus\Fraud\MaxMind\Request $maxMind = NULL, $recurrings = array(), $source = NULL ) { When Love is real it finds away Link to comment Share on other sites More sharing options...
Manager DawPi Posted November 16, 2022 Manager Share Posted November 16, 2022 Yeah, you learn very quickly. 1 intermedia - profesjonalne rozwiązania Invision Power Board --- Chcesz uzyskać szybko i sprawnie pomoc? Uzupełnij wersję i adres w profilu. Link to comment Share on other sites More sharing options...
Manager DawPi Posted November 16, 2022 Manager Share Posted November 16, 2022 Problem ROZWIĄZANY. Jeśli są jakiekolwiek wątpliwości, pytania proszę o założenie nowego tematu. Wszelkie uzasadnione reklamacje/pretensje/sugestie/rady przyjmuje ekipa forum. intermedia - profesjonalne rozwiązania Invision Power Board --- Chcesz uzyskać szybko i sprawnie pomoc? Uzupełnij wersję i adres w profilu. Link to comment Share on other sites More sharing options...
Recommended Posts