Show custom in payment provider process()
Posted: 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.
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
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'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