Paytm Integration

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!
sumit kaushik
Posts: 30
Joined: 08 Aug 2017, 07:20

Paytm Integration

Post by sumit kaushik » 27 Sep 2017, 14:04

Hello ,

I want to integrate paytm payment on checkout page. Could you please suggest me about this?

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

Re: Paytm Integration

Post by aimeos » 27 Sep 2017, 14:39

The easiest way is installing the ai-payments extension and using an Omnipay driver. For Paytm there's already one implemented:
https://github.com/sumityadav/omnipay-paytm

You should try if it works out of the box. Sometimes minor fixes are necessary to get drivers running.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

sumit kaushik
Posts: 30
Joined: 08 Aug 2017, 07:20

Re: Paytm Integration

Post by sumit kaushik » 28 Sep 2017, 07:11

I have installed omnipay paytm as suggested. But when i added provider class it gives me error Class "\Aimeos\MShop\Service\Provider\Payment\paytm" not available.

Please suggest me what will be the provider class in admin also what will be the provider service class in config/app.php?

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

Re: Paytm Integration

Post by aimeos » 28 Sep 2017, 08:13

An Aimeos service provider isn't the same as a Laravel service provider. They are something totally different.

Please make sure that you've executed

Code: Select all

composer require aimeoscom/ai-payments
Then go to the Aimeos admin interface and create a new service (type: payment) and use "OmniPay" for the provider field. Add this to the configuration on the right side (https://aimeos.org/docs/User_Manual/Adm ... st#Omnipay):
- omnipay.type : Paytm

Afterwards, you need to add the Paytm specific configuration (probably at least MID and MerchantKey):
https://github.com/sumityadav/omnipay-p ... ay.php#L19
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

sumit kaushik
Posts: 30
Joined: 08 Aug 2017, 07:20

Re: Paytm Integration

Post by sumit kaushik » 28 Sep 2017, 15:19

Thanks for your support,
It is working now but only problem is that it is not taking price and order id of aimeos. It is showing transaction amount from default parameters of gateway.php instead of my product from the cart.
Please suggest me about the issue.

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

Re: Paytm Integration

Post by aimeos » 28 Sep 2017, 21:08

The Omnipay Paytm driver uses incorrect parameter names (self-invented vs. official):
- OrderId vs. transactionId
- TransactionAmount vs. amount

You can see in the ai-payments extension what parameters as passed to the driver:
https://github.com/aimeoscom/ai-payment ... y.php#L617
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

sumit kaushik
Posts: 30
Joined: 08 Aug 2017, 07:20

Re: Paytm Integration

Post by sumit kaushik » 01 Oct 2017, 06:42

So i need to change parameters in omnipay-paytm /gateway.php file????

sumit kaushik
Posts: 30
Joined: 08 Aug 2017, 07:20

Re: Paytm Integration

Post by sumit kaushik » 01 Oct 2017, 09:12

Above problem has been resolved, but only issue left is , after successful payment it is not redirecting user back to my website.

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

Re: Paytm Integration

Post by aimeos » 01 Oct 2017, 10:17

Create a pull request and try to get the author to merge the bugfixes into the original repository.

The driver doesn't use the "returnUrl" provided and doesn't send it to Paytm. Thus, Paytm doesn't know where to redirect back.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

sumit kaushik
Posts: 30
Joined: 08 Aug 2017, 07:20

Re: Paytm Integration

Post by sumit kaushik » 09 Oct 2017, 13:22

Hello Support,
My paytm integration is working fine on development server but when i push it on live it is showing me error
Class omnipay/paytm/gateway not found.

Please suggest me what i missing.

Post Reply