Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gateway feature support metadata #16

Open
aseigo opened this issue Jan 30, 2017 · 3 comments
Open

Gateway feature support metadata #16

aseigo opened this issue Jan 30, 2017 · 3 comments
Milestone

Comments

@aseigo
Copy link

aseigo commented Jan 30, 2017

Would it make sense to allow gateways to return what features they support? e.g. a simple map like:

%{ methods_accepted: [:mastercard, :visa, :ec, :maestro ],
currencies: :all,
regions: :global,
subscriptions: true,
... }

This would allow automatic routing/deciding in future, as well as being able to know which gateways support things like subscription services? Could be extended in future to include preferences and/or cost information to allow choosing "cheapest, most preferred, available gateway" for a given purchase?

@swelham
Copy link
Owner

swelham commented Jan 30, 2017

Yes this definitely makes sense to have, especially if we start implementing features that some payment providers do not support.

I too have been thinking about automatic routing based on pricing, however I am yet to come up with a good way to keep the pricing data up to date without manual maintenance.

@swelham swelham added this to the post-v1 milestone Jan 30, 2017
@aseigo
Copy link
Author

aseigo commented Jan 30, 2017

I am yet to come up with a good way to keep the pricing data up to date without manual maintenance.

Probably requires some use case gathering to understand what is actually required and useful to know. As this will hopefully be a (largely?) internal calculation based on configuration data it should be possible to implement a "naive" calculation mechanism which can improve / be obfuscated by reality ;) over time.

But just having the metadata there as a first step would be good.

@swelham
Copy link
Owner

swelham commented Jan 30, 2017

I think there would need to be some research into how the different providers charge, some are per transaction (e.g. PayPal), some per batch of transactions (e.g. SagePay) and possibly some other forms that I have yet come across. Although I'm sure we could come up with an easy way normalise these structures into something that would allow the module to easily compare the costs of a given request.

But just having the metadata there as a first step would be good.

Absolutely, small steps lead to big gains 😃

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants