ewaypayment / eway-rapid-ruby Goto Github PK
View Code? Open in Web Editor NEWeWAY Rapid Ruby library
License: MIT License
eWAY Rapid Ruby library
License: MIT License
get error when try to payment with live credentials
Reading API docs (https://eway.io/api-v3/?ruby#token-payments) today it indicated that it should be possible to create and charge a customer token at the same time by using a combination of the Rapid SDK + Responsive Shared Page (amongst other options) and setting the Transaction Method.
I'm mocking out the code now to do this since it's something we'd like to do.
I found the EwayRapid::Enums::TOKEN_PAYMENT
which corresponded to the Transaction Method we'd wanted. This doesn't seem to be used anywhere in the code from what I can see. Digging through more code when we're using create_transaction
with Enums::PaymentMethod::RESPONSIVE_SHARED
we end up in Message::TransactionProcess::TransResponsiveSharedMsgProcess
which converts the input transaction into a request via Convert::Request::TransactionToCreateAccessCodeSharedRequest
.
This last one sets the Transaction Method, but only ever to PROCESS_PAYMENT
or AUTHORISE
. After which it just gets a response and then converted.
So being able to set this to TOKEN_PAYMENT
in the ruby SDK would be fantastic.
Other thing is I'm tempted to just override or monkey patch it for my use ๐. But if I'm doing so I may as well do it so that I can create a pull request. Writing this up I think I'll just do an attr_accessor
on Transaction
with a method variable. If it is set then that gets put onto the request, if it isn't then it defaults to the current logic.
That MAINLY relies on the response + result interpreters being able to interpret the different content. But I think I'll just open a PR since the initial bit sounds simple enough.
Just wondering if it would be possible to get support for v4.0 of the SDK? I notice it's already in the PHP version.
https://eway.io/api-v3/?shell#versions
It doesn't look like it would be hard since all the requests go via EwayRapid::Message::RestProcess
. Just opening an issue before I do so myself since it looks like at least some of the classes could have been templated originally.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.