MerchantAuthenticationTypeclass from authorized.net sample code implementation repo.
hi @makasim I just created a new gateway for Postfinance, a local PSP/bank here in switzerland. Now I wanted you to ask how you would implement the forwarding of error messages from the api to my symfony app. For example, if something is wrong with the expiration date of the credit-card I just get an error code in the response and want to add an error to the expiration date of the form.
I had two solutions in mind:
What is the way to go? I checked some other gateways but I didn't find something comparable.
The api should not do anything like that, it just send some raw data to the payment gateway and returns the response.
The response is stored in the payment details, It is your state of the payment.
Here you have options what to do next:
@g0ld3lux Here the doc for eloquant storage: https://github.com/Payum/PayumLaravelPackage/blob/master/docs/eloquent_storage.md
and here for gateway config: https://github.com/Payum/PayumLaravelPackage/blob/master/docs/store_gateway_config_in_database.md
Hi @toooni . Unfortunately, no. :smile:
By default the payum gateways are configured in a config.yml/payum.yml file in symfony.
But in my application I will have a lot of gateways for different customers, with different credentials.
And so I discovered the DoctrineStorage for gateway config (instead of file based).
And there is also a snippet how to configure (from the page I posted above).
$gatewayConfigStorage = new DoctrineStorage($objectManager, 'Acme\Payment\Entity\GatewayConfig'); /** @var Payum $payum */ $payum = (new PayumBuilder()) ->addDefaultStorages() ->setGatewayConfigStorage($gatewayConfigStorage) ->getPayum();
But I don't know how to introduce/combine this feature with symfony.
I suppose you are using the PayumBuilder. If so you can use its setGenericTokenFactoryPaths method https://github.com/Payum/Payum/blob/master/src/Payum/Core/PayumBuilder.php#L276
You may want to create your own implementation of TokenFactory (to make use of slim routing component for example). In that case you can use setTokenFactory method.