These are chat archives for Payum/Payum

23rd
Mar 2016
David Fuhr
@davidfuhr
Mar 23 2016 09:45
@makasim sounds nice implementing invalidation in an extension but how do i register the extension with my gateway? as far as i know the gateway factory has no access to payum and the httprequestverifier.. or did i miss something?
Max Kotliar
@makasim
Mar 23 2016 11:12
$builder->addGatewayFactoryConfig('aFactory', [
    'payum.extension.invalidate_token' => function(ArrayObject $config) {
        return new InvalidateTokenExtension($config['payum.security.token_storage']);
    }),
]);
David Fuhr
@davidfuhr
Mar 23 2016 14:48
great! thanks! is there a list of all those "magic" array keys of config?
hm.. as i think about it i can run var_dump(array_keys($config)) ... ^^
Max Kotliar
@makasim
Mar 23 2016 19:32
@davidfuhr you can find some of them in the core gateway factory or in the payment gateway you are using (paypal for example). Or you can just dump the keys
Max Kotliar
@makasim
Mar 23 2016 19:38

@Lctrs I gave it another thought, and now I think there is something you can do with the payum. That's what you can do

  1. Add Paypal's token to the notification url. IT has to be done on wordpress side.
  2. Setup payum paypal gateway with the same credentials you use in wordpress
  3. Add a custom notify action which overwrite the default one.
  4. Add a basic validation of queries (you can do it payum/paypal-ipn).
  5. If the validation pass, add a token to the model and try to sync it

With all that stuff you can theoretically get:

Complete payment model with all needed details. With all that info you can guess the payment status, do refund later and so on.

P.S. txn_id most like is the token so you can skip the step one.