Custom Payment Provider

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!
createanet
Posts: 72
Joined: 22 Mar 2021, 16:56

Custom Payment Provider

Post by createanet » 22 Mar 2021, 17:26

Hello there,

We wish to extend an omnipay package. We've followed the instructions outlined below

https://aimeos.org/docs/2020.x/providers/service/

...and extending the OmniPay class.

We continue to get the following error message.

Code: Select all

Argument 1 passed to Aimeos\MShop\Service\Provider\Base::__construct() must implement interface Aimeos\MShop\Context\Item\Iface, null given, called in /Users/XXXX/Sites/aimeos/vendor/omnipay/common/src/Common/GatewayFactory.php on line 88
We're using the omnipay/braintree package and need to generate a nonce token, we figured we could manage this by extending the class data?

Is it immediately obvious what we might be doing wrong?

Thanks

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

Re: Custom Payment Provider

Post by aimeos » 23 Mar 2021, 07:36

Seems like you've mixed Aimeos and Omnipay classes. If you post your code, it might be obvious.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

createanet
Posts: 72
Joined: 22 Mar 2021, 16:56

Re: Custom Payment Provider

Post by createanet » 31 Mar 2021, 17:25

This is exactly what I did, thank you.

I should have selected the new provider which was extending the omnipay provider.

The mistake I was making was assigning it as a type for the existing omnipay provider.

TGergo
Posts: 41
Joined: 24 Nov 2022, 14:35

Re: Custom Payment Provider

Post by TGergo » 18 Jan 2023, 15:18

I have a custom payment provider.
In function process() i can send data to payment gateway by cURL communication
and receive an URL, I redirect user to url.
She/He can make the payment.

If I understand correctly, I need a webroute, a controller which receive payment status.
And I need to change the payment status there.

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

Re: Custom Payment Provider

Post by aimeos » 19 Jan 2023, 16:43

TGergo wrote: 18 Jan 2023, 15:18 If I understand correctly, I need a webroute, a controller which receive payment status.
And I need to change the payment status there.
This is already available and you only need to implement the updateSync() and/or updatePush() method:

- updateSync() is called if the payment status can be determined when the customer is redirected to the checkout/confirm URL.

- updatePush() receives the data sent by the payment gateway using machine to machine communication (no user involved) and the payment gateway needs the URL for the checkout/update endpoint (either by sending it along with the request or by configuration in the backend of the payment gateway).
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

TGergo
Posts: 41
Joined: 24 Nov 2022, 14:35

Re: Custom Payment Provider

Post by TGergo » 24 Jan 2023, 09:39

OK, Thank You!

My redirect URL from the Payment gateway is: https://www.mywebsite.com/shop/confirm/ ... t_provider

And it will enter to public function updateSync.

Post Reply