Show custom in payment provider process()

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

Show custom in payment provider process()

Post by brunojti » 26 Aug 2016, 15:12

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

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

Re: Show custom in payment provider process()

Post by aimeos » 26 Aug 2016, 16:56

You can adapt the payment page template as you like for your project:
https://github.com/aimeos/ai-client-htm ... efault.php
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: Show custom in payment provider process()

Post by brunojti » 26 Aug 2016, 17:14

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 =)
Last edited by brunojti on 26 Aug 2016, 17:48, edited 1 time in total.

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

Re: Show custom in payment provider process()

Post by aimeos » 26 Aug 2016, 17:45

You can adapt it's template as well:
https://github.com/aimeos/ai-client-htm ... efault.php
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply