Omnipay

Help for integrating the Laravel package
Forum rules
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
User avatar
harshithvemula
Posts: 33
Joined: 19 Jul 2020, 16:27

Re: Omnipay

Post by harshithvemula » 30 Apr 2021, 18:29

I tried all this code but some times its redirecting to payment received and some times to payment unfinished even the payment is successful both times. Please help me

Code: Select all

public function getTransactionStatus()
    {
     // return static::STATUS_PENDING;
        // return isset($this->data['status']) ? $this->data['status'] : null;
        return $this->data['success'];


    }

      public function isSuccessful()
    {

        //return static::STATUS_PENDING;
        // return $this->getTransactionStatus() === static::STATUS_COMPLETED;

        //return false;
      //return !empty( $this->getTransactionStatus() === static::STATUS_COMPLETED);
        return $this->getTransactionStatus() === static::STATUS_PENDING 
         || $this->getTransactionStatus() === static::STATUS_COMPLETED ;
          
    }
    

User avatar
aimeos
Administrator
Posts: 7836
Joined: 01 Jan 1970, 00:00

Re: Omnipay

Post by aimeos » 01 May 2021, 15:57

Please have a look at the class which integrates Omnipay into Aimeos:
https://github.com/aimeoscom/ai-payment ... #L535-L602

Especially, keep an eys on these lines:
https://github.com/aimeoscom/ai-payment ... #L566-L590

Also make sure that the status update sent by the payment gateway later (in updateSync() the status is set on redirect, in updatePush() it's set by server updates) set the payment status correctly here:
https://github.com/aimeoscom/ai-payment ... #L492-L524
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply