Payment provider status update

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!
brunojti
Posts: 27
Joined: 29 Jul 2016, 14:02

Payment provider status update

Post by brunojti » 30 Aug 2016, 11:59

Hey there!

I was able to send the request to create a payment in my payment provider. YAY! :D :D :D

Now I can update the payment status via the provider, and I should provide a URL (So the provider can send post requests with status updates).

My question is:
Which url I should provide to receive these updates ( to trigger the `updateSync` function)?

How can I log to a text file the $params when I receive them via `updateSync`?

Thanks

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

Re: Payment provider status update

Post by aimeos » 31 Aug 2016, 17:33

brunojti wrote:I was able to send the request to create a payment in my payment provider. YAY! :D :D :D
Great! :-)
brunojti wrote:Now I can update the payment status via the provider, and I should provide a URL (So the provider can send post requests with status updates).
My question is:
Which url I should provide to receive these updates ( to trigger the `updateSync` function)?
What did you've implemented? An Omnipay driver or an Aimeos payment service provider?
brunojti wrote:How can I log to a text file the $params when I receive them via `updateSync`?
In Aimeos you have a logger object in the context. If you use

Code: Select all

$this->getContext()->getLogger()->log( '...' );
it will log an error message to the madmin_log table.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

brunojti
Posts: 27
Joined: 29 Jul 2016, 14:02

Re: Payment provider status update

Post by brunojti » 01 Sep 2016, 12:17

What did you've implemented? An Omnipay driver or an Aimeos payment service provider?
I am using a Custom Provider (based in Omnipay's code)

Code: Select all

    public function process(\Aimeos\MShop\Order\Item\Iface $order, array $params = array())
    {

        if (!isset($params['payment_type']) || empty($params['payment_type'])) {
            return $this->getPaymentForm($order, $params);
        }

        return $this->processOrder($order, $params);
    }

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

Re: Payment provider status update

Post by aimeos » 02 Sep 2016, 08:09

The payment URLs are automatically generated depending on your environment and passed to the Omnipay driver:
https://github.com/aimeoscom/ai-payment ... y.php#L657
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply