Page 1 of 1

Show custom in payment provider process()

Posted: 26 Aug 2016, 15:12
by brunojti
Using the following code I was able to show an example form field for user input after the user confirms the summary data.

Code: Select all

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

        $list = array(
            'myprovider.accountno' => new \Aimeos\MW\Criteria\Attribute\Standard( array(
                'label' => 'Account number',
                'code' => 'myprovider.accountno',
                'internalcode' => 'myprovider.accountno',
                'internaltype' => 'string',
                'type' => 'string',
                'default' => '',
                'public' => true,
            ) ),
        );

        $gatewayUrl = $this->getConfigValue(array('payment.url-self'));
        return new \Aimeos\MShop\Common\Item\Helper\Form\Standard($gatewayUrl, 'POST', $list);
    }
I would need to have more control over this template, add HTML and Javascript for allowing the User to choose payment method and provide the payment data.
I'll also need to get some values by ajax before confirming the payment. I already have a `App\Http\Controllers\AjaxController` that handles the ajax requests...

How can I do this? Thanks

Re: Show custom in payment provider process()

Posted: 26 Aug 2016, 16:56
by aimeos
You can adapt the payment page template as you like for your project:
https://github.com/aimeos/ai-client-htm ... efault.php

Re: Show custom in payment provider process()

Posted: 26 Aug 2016, 17:14
by brunojti
I have skipped that page from checkout process, the page I am talking about is the page after summary...

EDIT: The file to edit is: `checkout/standard/order-body-default.php`.

I hope I'm not making anything wrong here =)

Re: Show custom in payment provider process()

Posted: 26 Aug 2016, 17:45
by aimeos
You can adapt it's template as well:
https://github.com/aimeos/ai-client-htm ... efault.php