Omnipay
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!
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
- harshithvemula
- Posts: 33
- Joined: 19 Jul 2020, 16:27
Omnipay
I tried to add payu , 2checkout , paypal using omnipay but it doesnt work. I got the error "class Omnipay/Payu or paypal or 2checkout/Gateway" not found. And i tried a payment gateway instamojo it worked ( I didnt got any class not found error ) and i saw that the folder structure of instamojo was "gentor/omnipay-instamojo/src/Omnipay/Instamojo/Gateway.php" It worked but with an error purpose parameter not found . But when it comes to paypal or payu the folder structure was "bileto/omnipay-instamojo/src/Gateway.php" and i am getting the following error "class Omnipay/Payu or paypal or 2checkout/Gateway" not found. Is this class not found error because of folder structure or something ?
Please help me with class not found error for payu, paypal, or help me with instamojo by solving purpose parameter not found error
---Thank you
Please help me with class not found error for payu, paypal, or help me with instamojo by solving purpose parameter not found error
Code: Select all
"aimeos/ai-payments": "^2020.10",
composer require league/omnipay:^3 omnipay/paypal
instamojo,payu
---Thank you
Re: Omnipay
The directory structure is different because of the used PSR-0 and PSR-4 standards but that doesn't matter if you installed the drivers correctly. Did you use a command like this to install the payment drivers?
Code: Select all
composer req aimeos/ai-payments gentor/omnipay-instamojo bileto/omnipay-payu omnipay/2checkout
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star
- harshithvemula
- Posts: 33
- Joined: 19 Jul 2020, 16:27
Re: Omnipay
Yes i used those commands to install the drivers
Code: Select all
"aimeos/ai-payments": "^2020.10",
composer require league/omnipay:^3 omnipay/paypal
Re: Omnipay
Not all Omnipay drivers work out of the box as many developers only implment them for their own project and don't fully follow the rule for implemenation.
Also, you have to check how the payment gateway class is named and what parameter it requires. Many drivers don't have a suitable readme file and you have to look at the gateway class directly. For the 2checkout driver, the gateway name is "TwoCheckout" and the required parameters are listed here:
https://github.com/thephpleague/omnipay ... hp#L24-L25
Also, you have to check how the payment gateway class is named and what parameter it requires. Many drivers don't have a suitable readme file and you have to look at the gateway class directly. For the 2checkout driver, the gateway name is "TwoCheckout" and the required parameters are listed here:
https://github.com/thephpleague/omnipay ... hp#L24-L25
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star
Re: Omnipay
This worked perfectly, thanks!aimeos wrote: ↑01 Dec 2020, 14:34 Not all Omnipay drivers work out of the box as many developers only implment them for their own project and don't fully follow the rule for implemenation.
Also, you have to check how the payment gateway class is named and what parameter it requires. Many drivers don't have a suitable readme file and you have to look at the gateway class directly. For the 2checkout driver, the gateway name is "TwoCheckout" and the required parameters are listed here:
https://github.com/thephpleague/omnipay ... hp#L24-L25
- harshithvemula
- Posts: 33
- Joined: 19 Jul 2020, 16:27
Re: Omnipay
2checkout worked for me also.Please help me with payu 'Omnipay/payu/Gateway' not found error,i am getting continously.I tried in many ways please help me."alegra/omnipay-payu": "^0.0.21", is the package name i am using. May be the gateway name i am using "payu" is wrong
Re: Omnipay
The bileto/omnipay-payu driver is for Omnipay 2.x only and doesn't support current Omnipay 3.x. You can try to ask the mainainer for the driver for help.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star
- harshithvemula
- Posts: 33
- Joined: 19 Jul 2020, 16:27
Re: Omnipay
After successful payment I am redirecting to the below url but the payment status is unfinished.
ORDER STATUS
Order ID :247
Payment status : unfinished
Code: Select all
http://127.0.0.1:8000/shop/confirm/Instamojo?payment_id=MOJO1412705N45333693&payment_status=Credit&payment_request_id=d7249b9a0c5545c69f5929587e541946
Order ID :247
Payment status : unfinished
Re: Omnipay
Check what happens in the InstaMojo driver and what is passed to the Omnipay class here:
https://github.com/aimeoscom/ai-payment ... #L535-L602
https://github.com/aimeoscom/ai-payment ... #L535-L602
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star
- harshithvemula
- Posts: 33
- Joined: 19 Jul 2020, 16:27
Re: Omnipay
I am trying from 3 days but not able to solve. please help me.
Instamojo driver code below (Response.php)
Instamojo driver code below (Response.php)
Code: Select all
/**
* Was the transaction successful?
*
* @return string Transaction status, one of {@see STATUS_COMPLETED}, {@see #STATUS_PENDING},
* or {@see #STATUS_FAILED}.
*/
public function getTransactionStatus()
{
return static::STATUS_PENDING;
}
public function isSuccessful()
{
return false;
//return !empty($this->data['success']);
//return $this->getTransactionStatus() === static::STATUS_PENDING;
// return $this->getTransactionStatus() === static::STATUS_COMPLETED ;
}
}