Skocz do zawartości
"Idzie nowe..." - o zmianach i nie tylko ×
Przeniesienie zakupów z IPS Marketplace / Moving bought items from IPS Marketplace ×

fatal error


Przejdź do rozwiązania Rozwiązane przez DawPi,

Rekomendowane odpowiedzi

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

ArashDev.com

Odnośnik do komentarza
Udostępnij na innych stronach

  • Manager
  • Rozwiązanie

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() )
	{

 

  • Dziękuję 1

intermedia - profesjonalne rozwiązania Invision Power Board

---

Chcesz uzyskać szybko i sprawnie pomoc? Uzupełnij wersję i adres w profilu.

Odnośnik do komentarza
Udostępnij na innych stronach

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

 

ArashDev.com

Odnośnik do komentarza
Udostępnij na innych stronach

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 )
	{		

 

ArashDev.com

Odnośnik do komentarza
Udostępnij na innych stronach

  • Manager

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.

Odnośnik do komentarza
Udostępnij na innych stronach

Gość
Ten temat został zamknięty. Brak możliwości dodania odpowiedzi.
  • Ostatnio przeglądający   0 użytkowników

    • Brak zarejestrowanych użytkowników przeglądających tę stronę.
×
×
  • Dodaj nową pozycję...

Powiadomienie o plikach cookie

Umieściliśmy na Twoim urządzeniu pliki cookie, aby pomóc Ci usprawnić przeglądanie strony. Możesz dostosować ustawienia plików cookie, w przeciwnym wypadku zakładamy, że wyrażasz na to zgodę.