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

Adyen #168

Open
wants to merge 28 commits into
base: dev
Choose a base branch
from
Open

Adyen #168

wants to merge 28 commits into from

Conversation

anantanant2015
Copy link
Contributor

Added authorize, capture, purchase, void, refund, with helper functions, and integration tests.

oyeb and others added 22 commits April 22, 2018 16:56
* Fixes #1: Introducing `Response.t`

with docs

* [monei] Adapted for new `Response.t`

* Refactored `commit`, `respond` for readability

* [monei] Updated test cases

* Corrected specs

* [bogus] Adapted for Response.t
* Gringotts does not start any process now
* Removed `adapter` key from config as it was redundant.
* Updated docs and mix task.
- Updated dependency `xml_builder`. The new `generate/2` provides a
`format: :none | :indented` option.
- `:format` is set to `:none` to produce "minified" network requests.

* This is almost a complete rewrite to reduce code duplication.
  - check_response_type() was acting as guard that matched only against
some response types. It did not handle the scenario when a non-supported
response would be obtained. It really served no purpose
  - check_response_type -> extract_gateway_response
    + This guards as well as fetches, previously the fetch was being
done multiple times.
* Moved all response handling inside the `ResponseHandler`.
* Since we now have a struct, and want to deprecate `:success`, `Response.success/1` and `Response.error/1`, helpers now act on structs.
* `errorCode` and `errorText` are used to build `:reason`.

+ Removed pointless asserts from tests.
Also added CAVV result filed to the response which is nil for
MaasterCards (as per ANet docs).
* Fix Adapter moduledoc and bogus gateway

* Fixes #24
* bogus test also uses Money protocol now
* Changed validate_config docs

* Improved mix task docs (filename)

* Better module name suggestion
* Now, Filename can be specified on the CLI with the `-f` flag

* Added changelog and contributing guide.

* Also reworded README slightly

* Correct "amount" in examples to ex_money

* Replaced example bindings with links to `.iex.exs`

* Removed unused params from functions.

* Fix call to `downcase`
* Ignore some optional params for RF, RV, CP

Some optional params like billing, customer, merchant must not be
expanded in case of capture, refund and void.

* Improved mock tests, fixes #98

Mock tests now mostly check if the request is correctly built.
Since most requests have common parameters, they are not checked
everywhere.

* Improve integration tests (more cases), fixes #108

* Integration tests no longer use the worker as a workaround for #8
* Added more test cases, can possibly be improved using describe blocks with
local setup.
* There are almost no assertions and it is expected that errors will
bubble up to the pattern matches.
* Fixes #5 and #109
* Moved the stripe_test to integration.
* Fixed credo issue in money integration test

Changes to MONEI
* Removed unnecessary clauses from MONEI
* Re-formatted source.
* Trexle does not seem to provide fraud risk, AVS, CVV validation
results. There are no docs for this.
* Refactored ResponseHandler, updated Response.t
* CAMS now parses AVS and CVV response - that was missing till now.
* Removes unnecessary `parse` clause.
* Mock tests shouldn't use gringotts.ex
* Update travis config, add .formater.exs

* Migrate to CodeCov
* Travis will run the formatter check
* Add git-hooks and update contribution guide
* Changed credo lin-length config from 80 to 100
* Ran the formatter on the project
* Fix credo warnings
[global-collect] Layout, docs and code refactor
===============================================

New features
------------
Risk, AVS, CVS fields added in `Response` struct!

Layout, docs
-----------
* `credo` issues resolved.
* Corrected `amount` in examples
* Ran the elixir 1.6 code formatter
  - Used sigils in mocks

Code refactors
--------------
* Removed unnecessary functions
  - Reduced arity of `add_money`
* Refactored Timex usage
* Removed a test on `validate_config` as it is already tested.
* Bumped version to 1.1.0
* Not running integration tests on travis
* Added Changelog for release 1.1.0(refer CHANGELOG.md)
* New public methods: refund
* `store` has been removed because Paymill does not have a
  direct API integration for card token generation
* Improved docs and uses Money protocol

Refactors
----------
* refactored add_amount -> amount_params
* updated tests and clubbed a few parse clauses
* refactored commit and response functions

Tests
------
* Paymill mock (#159)
* Added mock test cases for paymill.
* Configured mock files to get compiled in `:test` env.
* Moved paymill responses in mocks folder.
* Add clause to catch/handle bad config format

Closes #150
Closes #136

* [ci-skip] Improve mock test template

* Since all mock tests are to be written using Bypass, removed mock file
as well as mention of `mock` library.
* Added setup and parse to the test template
@codecov-io
Copy link

codecov-io commented May 7, 2018

Codecov Report

❗ No coverage uploaded for pull request base (dev@10ba1d0). Click here to learn what that means.
The diff coverage is n/a.

Impacted file tree graph

@@          Coverage Diff           @@
##             dev     #168   +/-   ##
======================================
  Coverage       ?   69.47%           
======================================
  Files          ?       15           
  Lines          ?      475           
  Branches       ?        0           
======================================
  Hits           ?      330           
  Misses         ?      145           
  Partials       ?        0           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 10ba1d0...2474f3f. Read the comment docs.

@oyeb oyeb force-pushed the dev branch 2 times, most recently from e8323fd to 73ea35e Compare June 8, 2018 12:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants