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

Add 3DS2 Support to Netbanx #3394

Merged
merged 4 commits into from
Oct 17, 2019

Conversation

Jujhar
Copy link
Contributor

@Jujhar Jujhar commented Oct 15, 2019

Adds Netbanx threeDSecure options to add payment and add credit card, as per request from Paysafe.

Copy link

@nebdil nebdil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The build is failing due to some style requirements, but nothing major

lib/active_merchant/billing/gateways/netbanx.rb Outdated Show resolved Hide resolved
Copy link
Collaborator

@bbraschi bbraschi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tx Jujhar!

lib/active_merchant/billing/gateways/netbanx.rb Outdated Show resolved Hide resolved
@nebdil nebdil merged commit 1d84209 into activemerchant:master Oct 17, 2019
jeffdill2 added a commit to ammoready/active_merchant that referenced this pull request Mar 10, 2020
* Add Kosovo to the list of countries (#3226)

Although these codes are not officially in the ISO standard, they are
used by the European Commission, and we're seeing some buyers use them.
The numeric code, which is almost never used by the provider, is one of
the reserved codes that will never be assigned to an actual country. If
Kosovo is added to the ISO standard, we can correct it at that time.

* [Realex] Add 3DS support through external MPI (#3284)

* [Realex] Add 3DS support through external MPI

A few sample request we got from Realex contacts

```
<mpi>
  <cavv>AAACBllleHchZTBWIGV4AAAAAAA=</cavv>
  <xid>crqAeMwkEL9r4POdxpByWJ1/wYg=</xid>
  <eci>5</eci>
  <message_version>1</message_version>
</mpi>
```

And

```
<mpi>
  <eci>5</eci>
  <ds_trans_id>c272b04f-6e7b-43a2-bb78-90f4fb94aa25</ds_trans_id>
  <authentication_value>ODQzNjgwNjU0ZjM3N2JmYTg0NTM=</authentication_value>
  <message_version>2.1.0</message_version>
</mpi>
```

* Prefer single quotes

* Adding fixtures for 3DS

* Add 3DS 1.0 values to paypal (#3279)

* Release v1.96.0

* CardConnect: fix domain GSF

Keep domain as top level gateway field, domain option will always
be passed but can be nil, in which case the default live_url will
be used.

ECS-448

Unit:
22 tests, 92 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions,
0 notifications
100% passed

Remote:
23 tests, 55 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions,
0 notifications
100% passed

Closes #3283

* ECS-217_braintree_stored_credentials

Unit:
73 tests, 174 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions,
0 notifications
100% passed

Remote:
79 tests, 435 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions,
0 notifications
100% passed

Closes #3286

* Realex: Re-implement credit as general credit

Re-implemented the `credit` action (known as `general_credit` in
Spreedly parlance) for the Realex gateway from its deprecated
implementation of re-using the `refund` action to performing an actual
`credit` (non-reference credit) transaction.

CE-52 / CE-58

Unit:
28 tests, 975 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions,
0 notifications
100% passed

Remote:
27 tests, 138 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions,
0 notifications
100% passed

* Paymill: Add currency and amount to store requests.

Paymill now requires a currency and amount to be specified for tokenization. These are used for an authorization. We now set this to $1 USD, which is the minimum required.

Suite test/remote/gateways/remote_paymill_test
18 tests, 74 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed

All unit tests
4188 tests, 70111 assertions, 0 failures, 0 errors, 0 pendings, 2 omissions, 0 notifications
100% passed

Rename store_endpoint -> store_endpoint_url
Combine tests for store currency and amount

Tweak comment

Update Changelog for Paymill store change

* [Orbital] Add support for 3DS (#3261)

This adds values for 3DS transactions. You can validate that those xml keys are valid by looking at the xsd.

* Realex: Fix a runtime error that occurs when the rebate_secret or refund_secret option is set to nil. In that case, the Realex gateway initializer attempted to calculate the refund hash or credit hash, passing nil to Digest::SHA1.hexdigest,which caused the error. The fix is to only compute each hash if a secret has actually been provided.

All unit tests

4189 tests, 70115 assertions, 0 failures, 0 errors, 0 pendings, 2 omissions, 0 notifications
100% passed

Loaded suite test/remote/gateways/remote_realex_test
27 tests, 138 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed

CE-52

Closes #3291

* Beanstream: Pass card owner when storing tokenized cards (#3007)

* add MONEI 3d secure support (#3292)

* add MONEI 3d secure support

* remove trailing whitespaces

* add more unit and remote tests for MONEI gateway

* MercadoPago: Add Cabal card type

Added the Cabal card type to Active Merchant and to the MercadoPago
gateway.

CE-64

Unit:
25 tests, 129 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions,
0 notifications
100% passed

Remote:
26 tests, 76 assertions, 2 failures, 0 errors, 0 pendings, 0 omissions,
0 notifications
92.3077% passed

The `test_partial_capture` and
`test_successful_purchase_with_processing_mode_gateway` remote tests are
currently failing and were failing prior to making any of these changes.

* Add app based 3DS auth and purchase to Adyen (#3298)

To create app based auth and purchases requests two things need to happen:

1) Send channel as "app"
2) Don't send notificationURL

* Adds Naranja card type

This adds support for the Naranja card type along with the custom
card number validation logic they use. Naranja is added as a card
type to the following gateways: Bluesnap, dLocal, PayU Latam, Ingenico
ePayments, Mercado Pago, Worldpay, Adyen

There is a single BIN number for Naranja (589562) -- it is co-branded
with Visa, Mastercard, and Amex and will be identified as the co-brand
in those cases.

Added remote gateway test for dLocal and PayU Latam -- remaining
gateways either didn't have a Naranja test card available or needed
additional configuration for Naranja cards (card type or region enabled)

Removed two tests from PayU Latam because capture and void methods are
now supported in the sandbox.

Remote dLocal tests
Remote
22 tests, 61 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions,
0 notifications
100% passed

Remote PayU Latam tests
30 tests, 72 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions,
0 notifications
100% passed

Card method unit tests
35 tests, 231 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions,
0 notifications
100% passed

EVS-171
Closes #3299

* CyberSource: Add support for issuer additionalData gateway-specific field

Added support for the issuer additionalData CyberSource-specific field. The CyberSource XML schema has also been updated. Per the gateway's instructions, we are now using version 1.156 in the test environment,
and version 1.155 in production.

CE-56

Unit tests:

4195 tests, 70144 assertions, 0 failures, 0 errors, 0 pendings, 2 omissions, 0 notifications
100% passed

test/remote/gateways/remote_cyber_source_test.rb contains 5 pre-existing, unrelated test failures:
- test_successful_3ds_validate_authorize_request
- test_successful_3ds_validate_purchase_request
- test_successful_pinless_debit_card_puchase
- test_successful_tax_calculation
- test_successful_validate_pinless_debit_card

59 tests, 260 assertions, 5 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications

* Release v1.97.0

* Stripe Payment Intents - Add new gateway

In preparation for Stripe 3DS2 support, this PR adds support for Stripe
Payment Intents. Stripe Payment Intents is added as a gateway, with
functionality to create new PaymentIntents and Stripe PaymentMethods.
PaymentIntents can also be confirmed, captured, cancelled, shown, and
updated. This gateway is implemented as a subclass of the Stripe gateway.
To take advantage of the latest features, the API for this gateway is
bumped up to the latest version, `2019-05-16`.

Remote:
24 tests, 103 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed

Unit:
6 tests, 42 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed

Closes #3290

* Stripe: Send cardholder name and address with 3DS 1.0

Add the cardholder name, address, email and phone to the card source
created for 3DS 1.0 transactions.

ECS-455

Unit:
135 tests, 722 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed

Remote:
67 tests, 313 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed

Remote 3DS:
12 tests, 88 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed

closes #3300

* Checkout_v2: Support for native 3DS2.0

Adds a method to verify a payment after its gone through 3DS
authentication.

Loaded suite test/unit/gateways/checkout_v2_test
..........................

26 tests, 116 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed

Loaded suite test/remote/gateways/remote_checkout_v2_test

29 tests, 70 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed

* Adds new Maestro BINs

Adds additional BINs for Maestro to ensure valid  payment methods
pass validation and avoid card errors.

BIN lists from the Binbase and BINDB subscriptions are used as the
reference for the largest, contiguous, non-overlapping range of Maestro
BINs possible from these lists. There are some additional Maestro BINs
in the list that have not been added with this change. Effort to ensure
an up-to-date match for all valid card BINs will be done as part of
EVS-178.

Unit:
4205 tests, 70188 assertions, 0 failures, 0 errors, 0 pendings, 2 omissions, 0 notifications
100% passed

Closes #3305

* Re-add removed changelog entry (#3304)

* eWAY Rapid: Rework logic for setting the customer and shipping address fields for the purchase, authorize, store, and update operations.

- When no address has been provided, default to the name associated with the payment method.

- Fixed a bug in which the email was not set if no address was provided.

- Fixed a bug in which the shipping address phone number was not set.

In addition, some existing failing/erroring tests were updated to pass correctly, and test coverage for the customer and shipping address data logic has been added.

Unit tests:

4228 tests, 70411 assertions, 0 failures, 0 errors, 0 pendings, 2 omissions, 0 notifications
100% passed

test/remote/gateways/remote_eway_rapid_test.rb:

28 tests, 155 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed

2 pre-existing remote tests have been known to fail at times (perhaps depending on the time of day).

CE-73

* PayU Latam: Add support for merchantBuyerId

Unit tests:
4229 tests, 70420 assertions, 0 failures, 0 errors, 0 pendings, 2 omissions, 0 notifications
100% passed

test/remote/gateways/remote_payu_latam_test.rb:
30 tests, 72 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed

CE-95

* Update Braintree Gem

Update to latest gem version to support 3DS2 fields.
https://github.com/braintree/braintree_ruby/blob/master/CHANGELOG.md

Closes #3311

Unit:
6 tests, 6 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed

Blue Remote:
79 tests, 435 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed

Blue Unit:
73 tests, 174 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed

Orange Remote:
21 tests, 91 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed

Orange Unit:
18 tests, 69 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed

* Fat Zebra: Send metadata for purchase and authorize

Include metadata with purchase and authorize requests.

Unit:
18 tests, 95 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed

Remote: (1 unrelated failure)
23 tests, 82 assertions, 1 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
95.6522% passed

closes #3101

* Support custom fields for TrustCommerce

Also fix some tests that previously failed.

Unit:
4236 tests, 70441 assertions, 0 failures, 0 errors, 0 pendings, 2 omissions, 0 notifications
100% passed

Remote:
17 tests, 67 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed

CE-96

* Decidir: Add Naranja Card
EVS-181

Adds Naranha card to Decidir gateway
Updated two tests to correspond to changed Decidir responses

Unit:
22 tests, 112 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions,
0 notifications
100% passed

Remote:
17 tests, 60 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions,
0 notifications
100% passed

* Stripe Payment Intents - Update transfer_data option

Rather than requiring a user to send in a hash with transfer data, this PR changes
to use individual `transfer_destination` and `transfer_amount` fields instead.

Remote:
24 tests, 103 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed

Unit:
6 tests, 42 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed

* Barclaycard SmartPay: Add support for shopper_statement gateway-specific field

Unit:
4237 tests, 70448 assertions, 0 failures, 0 errors, 0 pendings, 2 omissions, 0 notifications
100% passed

Remote:
35 tests, 75 assertions, 2 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
94.2857% passed

Unrelated pre-existing remote test failures:
- test_successful_authorize_with_3ds2_browser_client_data (IdentifyShopper expected, RedirectShopper returned)
- test_successful_third_party_payout (invalid credentials)

CE-105

* Stripe Payment Intents: Add billing_details to payments

Saves billing details (address, name, email, phone) to payment methods.

Remote:
25 tests, 107 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed

Unit:
6 tests, 42 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed

* BlueSnap: add standardized 3DS 2 auth fields

Unit:
30 tests, 142 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed

Remote:
37 tests, 115 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed

ECS-552

Closes #3318

* Add entry to CHANGELOG for #3318

* Barclaycard Smartpay: Add app based 3ds auth and purchase

Like Adyen (#3298), we need to be able to create app based auth
and purchase requests, setting device_channel appropriately and
only sending notificationURL for browser based requests.

Remote:
36 tests, 87 assertions, 1 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
97.2222% passed

Unit:
28 tests, 143 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed

Unrelated pre-existing remote test failures:
- test_successful_third_party_payout (invalid credentials)

* Stripe Payment Intents, Checkout V2: MOTO flag

This PR enables marking a transaction as MOTO on the Stripe Payment
Intents and Checkout V2 gateways. Note: For Stripe, accounts must
be configured to allow setting the MOTO flag (https://stripe.com/guides/strong-customer-authentication#phone-sales).
This PR also adds the list of supported countries for Stripe.

Stripe Payment Intents -
Remote:
28 tests, 115 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed

Unit:
6 tests, 42 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed

Checkout V2 -
Remote:
30 tests, 72 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed

Unit:
26 tests, 116 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed

* Braintree Blue: Adding 3DS2 passthru support (#3328)

* Adding 3DS2 passthru support to Braintree Blue

* Finish 3DS2 passthru support to Braintree Blue

Unit:
75 tests, 176 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed

Remote:
80 tests, 435 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed

ECS-499

* Global Collect: Add Cabal card

Adds the Cabal card to the Global Collect gateway (also known as the
Ingenico gateway).

The Ingenico gateway docs do not include a test card number for Cabal,
and sending card numbers that follow the Luhn algorithm and fall within
the Cabal card range results in error messages of "Rejected".
Therefore, no additional remote or unit tests were added to the Global
Collect gateway to test the implementation of the Cabal card type.

CE-94 / CE-97

Unit:
20 tests, 88 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions,
0 notifications
100% passed

Remote:
17 tests, 40 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions,
0 notifications
100% passed

* WorldPay: Add Cabal card

Adds the ability to use the newly added Cabal card to the WorldPay
gateway.

Although the WorldPay gateway documentation includes a test card number
for Cabal, the current gateway integration is not set up to accept Cabal
cards and results in error messages of `"Payment Method CABAL-SSL is
unknown; The Payment Method is not available."`. Therefore, no
additional remote or unit tests were added to the WorldPay gateway to
test the implementation of the Cabal card type.

CE-94 / CE-98

Unit:
66 tests, 392 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions,
0 notifications
100% passed

Remote:
50 tests, 215 assertions, 5 failures, 0 errors, 0 pendings, 0 omissions,
0 notifications
90% passed

Two of the failing tests are for 3DS parameter pass-through, which are
known to fail with the current test credentials. (See
https://github.com/activemerchant/active_merchant/commit/1243289c2e700e666a634a86611cd6fa8da0ae05#diff-5b1b45d9c385decf3c649a4e3e8ebbc5)

The other three failing tests are all related to `credit`:
 - `test_successful_credit_using_token`
 - `test_successful_mastercard_credit_on_cft_gateway`
 - `test_successful_visa_credit_on_cft_gateway`
These tests all result in error messages of `"Security violation"`, so
it's possible that the current credentials are not allowed to run
`credit` transactions.

* Decidir: Add Cabal card

Adds the Cabal card type to the Decidir gateway.

With our current test gateway implementation, it does not seem possible
to test Cabal cards. When attempting to run a remote test with a Cabal
test card number, the error message states that the request contains an
invalid BIN (first 6 digits of the card number). Therefore, the addition
of Cabal cards has not been tested on the Decidir gateway.

CE-94 / CE-100

Unit:
22 tests, 112 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions,
0 notifications
100% passed

Remote:
17 tests, 60 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions,
0 notifications
100% passed

* PayU Latam: Add Cabal card

Adds the Cabal card to the PayU Latam gateway, including adding new
remote and unit tests.

CE-94 / CE-101

Unit:
31 tests, 117 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions,
0 notifications
100% passed

Remote:
33 tests, 80 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions,
0 notifications
100% passed

* dLocal: Add Cabal card

Adds the Cabal card type to the dLocal gateway, including adding remote
tests to confirm that Cabal cards work on this gateway. The remote tests
include a failed purchase test to ensure that dLocal is validating the
test card.

CE-94 / CE-102

Unit:
17 tests, 67 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions,
0 notifications
100% passed

Remote:
26 tests, 72 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions,
0 notifications
100% passed

* BlueSnap: Add Cabal card

Adds the Cabal card type to the BlueSnap gateway.

I have been able to successfully add a remote test for a failed purchase
transaction made with an invalid Cabal card; however, when I try to run
a remote test for a successful purchase with a Cabal card, I receive the
error message "Transaction failed because there are no available
processors." (error code 14016). According to the [BlueSnap documentation](https://developers.bluesnap.com/v8976-JSON/docs/card-transaction-errors),
resolving this error requires contacting BlueSnap Support.

BlueSnap provides a [Cabal test card number](https://developers.bluesnap.com/docs/test-credit-cards)
in their docs, so it seems that Cabal needs to enabled on our test
gateway in order to test Cabal on this gateway.

CE-94 / CE-103

Unit:
27 tests, 110 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions,
0 notifications
100% passed

Remote:
36 tests, 112 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions,
0 notifications
100% passed

* Add entry to CHANGELOG for #3328

* added 3ds authenticated data if provided (#3294)

* [WIP] added 3ds authenticated data if provided

* trans_status_ares could be null in frictionless flow then use transStatus from the ARes

* add empty lines

* Using new variables provided in three_d_secure response

* Worldpay: Exemption flagging

This PR adds the necessary fields to mark transactions as MOTO
by setting dynamicInteractionType to MOTO when the payment is
marked as a manual entry (requires configuration on the account
level to be able to use).

Remote:
51 tests, 217 assertions, 5 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
90.1961% passed
(5 failing tests preexist current branch changes)
Unit:
66 tests, 392 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed

* Bambora Online ePay: 3DS support (#3321)

* [Checkout.com] Using options[:moto] for Moto transactions (#3330)

* Release v1.98.0

* Adyen: Set 3DS exemptions via API

There are a few different ways to request exemptions via Adyen.
Users can let Adyen handle compliance by default, they can
configure specific rules using dynamic 3dsecure, or they can set
exemption flags via the API. This PR updates the Adyen gateway to
allow users to set specific exemptions using the sca_exemption
field, used in conjunction with the execute_threed field. Users
can also now set execute_threed to false if they want to bypass
3DS on a transaction.

Remote:
66 tests, 213 assertions, 2 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
96.9697% passed
(2 failures unrelated, related to standalone 3ds feature)

Unit:
47 tests, 228 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed

* Adyen: Send "NA" instead of "N/A"

When an address field is not provided, the default will now be "NA"
instead of the previous "N/A". According to Adyen, this should improve
acceptance rates for transactions that do not include an address
provided by the customer.

CE-115

Unit:
47 tests, 228 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions,
0 notifications
100% passed

Remote:
66 tests, 213 assertions, 2 failures, 0 errors, 0 pendings, 0 omissions,
0 notifications
96.9697% passed

The two tests that are failing:
 - test_successful_purchase_with_auth_data_via_threeds1_standalone
 - test_successful_purchase_with_auth_data_via_threeds2_standalone

These failures seem to be unrelated to the changes here.

* Stripe Payment Intents: Successfully set application fee on capture

You do not need to pass the transfer destination in a capture request,
and in fact the request will fail if you try to post that data.
However, before this PR, we were requiring that a destination account
be present before setting the associated fee/transfer amount. This PR
updates the logic to set only the application fee or transfer amount
on capture requests when present.

Remote:
29 tests, 124 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed

Unit:
6 tests, 42 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed

* TNS: Support Europe endpoint

Closes #3346

Remote (1 failure for expired AP region test account)
13 tests, 44 assertions, 1 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
92.3077% passed

Unit:
17 tests, 78 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed

* Redsys: 3DS Support

This PR preps Redsys for 3DS integration. It adds the test and production
URLs for the 3DS service, updates the commit method to interact with the
appropriate endpoint for 3DS transactions, and updates the parse method
to appropriately parse responses.

Unit:
34 tests, 104 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed

Remote:
20 tests, 63 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed

* Worldpay: Allow multiple refunds per authorization

Remove the restriction to perform refunds only if a payment is in a
certain set of states.

ECS-344

Unit:
66 tests, 392 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed

Remote:
Two unrelated test failures.

53 tests, 232 assertions, 2 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
96.2264% passed

closes #3349

* MercadoPago: Add tests for Naranja card

Adds remote and unit tests for the Naranja card type

The `test_partial_capture` and
`test_successful_purchase_with_processing_mode_gateway` remote tests are
currently failing and were failing prior to these changes.

Remote:
30 tests, 91 assertions, 2 failures, 0 errors, 0 pendings, 0 omissions,
0 notifications
93.3333% passed

Unit:
28 tests, 147 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions,
0 notifications
100% passed

* CyberSource: Pass commerce indicator if present

Closes #3350

Remote (5 unrelated failures also on master):
59 tests, 259 assertions, 5 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
91.5254% passed

Unit:
61 tests, 288 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed

* Worldpay: Add 3DS2 Support

Adds 3DS support to worldpay gateway. Two remote tests failing that are
unlreated.

Loaded suite test/remote/gateways/remote_worldpay_test
.................................................
51 tests, 221 assertions, 2 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
96.0784% passed

Loaded suite test/unit/gateways/worldpay_test
Started
...................................................................

67 tests, 397 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed

* Worldpay: Add 3DS2 Support

Adds 3DS support to worldpay gateway. Two remote tests failing that are
unlreated.

Loaded suite test/remote/gateways/remote_worldpay_test
.................................................
51 tests, 221 assertions, 2 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
96.0784% passed

Loaded suite test/unit/gateways/worldpay_test
Started
...................................................................

67 tests, 397 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed

* Revert "Worldpay: Add 3DS2 Support"

This reverts commit 20b865be8e73bb797d1de14fdb0dfb7414e28799.

* Credorax: Add 3DS 2.0

Adds 3DS 2.0 fields to credorax and a new field that is required for
passing 3DS authenticated fields.

Loaded suite test/remote/gateways/remote_credorax_test
..........................

-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
26 tests, 73 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Loaded suite test/unit/gateways/credorax_test

-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
23 tests, 124 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

* TNS: Update verison and support pay mode

This is an account-level flag that allows single-step purchases.
Test cards were updated to use expiry date to invoke response codes
according to https://na-gateway.mastercard.com/api/documentation/integrationGuidelines/supportedFeatures/testAndGoLive.html?locale=en_US

Closes #3355

Remote (1 unrelated failure due to regional test account):
14 tests, 48 assertions, 1 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
92.8571% passed

Unit:
17 tests, 78 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed

* Stripe: add countries to supported list

* Stripe Payment Intents: add supported countries

* Mundipagg: Append error messages to the message response field

For purchase, authorize, and store, extract any error messages from the
gateway response and append them to the "message" response feld. Mundipagg
can return errors at either the top level of the response object, or under
the last_transaction gateway_response key.

CE-114

Unit:
4268 tests, 70604 assertions, 0 failures, 0 errors, 0 pendings, 2 omissions, 0 notifications
100% passed

Remote:
37 tests, 93 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed

* Redsys: Add exemptions

Sets sca_exemption when available for 3ds transactions. Also sets
moto flag when requested.

Remote:
22 tests, 68 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed

Unit:
36 tests, 111 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed

* Credorax: Add A Mandatory 3DS field

Credorax now requires `3ds_transtype` is required. This passes a default
value if none is passed. Also passes optional field `3ds_version`.

Loaded suite test/unit/gateways/credorax_test
Started
.......................

23 tests, 125 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed

Loaded suite test/remote/gateways/remote_credorax_test
Started
..........................

26 tests, 74 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed

* Beanstream: update void authorization

Change the void action for authorization transactions to capture a 0 amount, per Beanstream's recommendation.

ECS-514 #close

Unit:
23 tests, 108 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed

Remote:
43 tests, 195 assertions, 2 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
95.3488% passed

NOTE: Failing tests also failing in current master as of time of this
run.

* CyberSource: Support 3DS2 pass-through fields

Closes #3363

Remote (5 unrelated failures):
63 tests, 267 assertions, 5 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
92.0635% passed

Unit:
63 tests, 307 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed

* Worldpay: Switch to Nokogiri

The `&` symbol was causing issues when parsing responses from worldpay.
This updates the parsing method to Nokogiri so these special characters
no longer cause an issue.

2 remotes tests failing for unrelated reasons.

Loaded suite test/unit/gateways/worldpay_test
...................................................................

67 tests, 397 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed

Loaded suite test/remote/gateways/remote_worldpay_test
....................................................

54 tests, 235 assertions, 2 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
96.2963% passed

* Credorax: Add MOTO support

Credorax uses the field a2 to mark payment source type. Possible
values for this field are:

2 - Online Order (default value)
3 - Telephone Order
4 - Mail Order
5 - Virtual Terminal

This PR sets the value to 3 when the manual entry flag is set.
Unit:
24 tests, 128 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed

Remote:
27 tests, 78 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed

* Credorax: Enable selecting a processor

Adds gateway specific fields to the Credorax gateway to enable the user
to select a different processor, including adding a unit test and a
remote test.

Gateway specific fields added:
 - R1: processor name
 - R2: processor merchant ID

CE-35

Unit:
23 tests, 106 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions,
0 notifications
100% passed

Remote:
27 tests, 78 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions,
0 notifications
100% passed

* Revert "Worldpay: Switch to Nokogiri"

This reverts 0735e8977affbd929e1605e5ded9e7d3567096a9 due XML parse
exceptions that we observed with production traffic.

Unit Tests:
67 tests, 397 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed

Remote Tests:
All failed because " Failed with 503 Service Unavailable" at the time of
this change

* Adyen: Add Cabal card

Added the Cabal card to the Adyen gateway, including adding unit and
remote tests.

Currently, Adyen does not support recurring transactions for Cabal
cards, so additional logic was added to the `store` method to return an
error message when attempting to store a Cabal card. Since the `store`
method for Adyen uses the `authorise` action, even though Cabal cards
cannot be successfully stored, the response from the gateway is
successful and does not return any sort of error message. Therefore, the
response from the gateway is altered to accurately reflect when a card
is not successfully stored by Adyen.

CE-99

Unit:
40 tests, 193 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions,
0 notifications
100% passed

Remote:
72 tests, 232 assertions, 3 failures, 0 errors, 0 pendings, 0 omissions,
0 notifications
95.8333% passed

The two failing tests are
 - `test_successful_purchase_with_auth_data_via_threeds1_standalone`
 - `test_successful_purchase_with_auth_data_via_threeds2_standalone`

These two tests were recently added in #3294 and appear to have never
passed for Spreedly.

* Decidir: Add remote tests for Cabal and Naranja

Added remote tests for the new card types Cabal and Naranja now that
the Decidir test gateway has been updated to accept these card types.

In addition, added new logic to determine the correct
`payment_method_id` based on the card type. These ID numbers come from
the "Medios de Pago Disponibles" ("Available Payment Methods") table
found in the Decidir documentation at
https://decidirv2.api-docs.io/1.0/tablas-de-referencia-e-informacion-para-el-implementador/medios-de-pago-disponibles.

Unit tests were also added to confirm that the `payment_method_id`
parameter is set correctly for Visa, Cabal, and Naranja card brands.

CE-94 / CE-110

Unit:
22 tests, 112 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions,
0 notifications
100% passed

Remote:
19 tests, 66 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions,
0 notifications
100% passed

* Pass the correct field in Status for 3DS in payflow (#3362)

* CyberSource: Use 3DS hash for enrolled field

Closes #3371

Remote (5 unrelated failures):
63 tests, 267 assertions, 5 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
92.0635% passed

Unit:
63 tests, 307 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed

* Release v1.99.0

* Revert "Revert "Worldpay: Switch to Nokogiri""

This reverts commit 59472b102db3668e9363f1a41668355ce1ac4033.

This change was found not to have cause the previously mentioned issues.

Closes #3373

Remote (5 unrelated failures):
54 tests, 231 assertions, 5 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
90.7407% passed

Unit:
67 tests, 397 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed

* Adyen: Fix message for authorise3d

When making an `authorise3d` request on the Adyen gateway, there was not a proper
mapping for refusal response messages. This looks to be an oversight in the
original addition of `authorise3d` as the support was added to `success_from`
but not to `message_from`.

2 remote failures are unrelated to this change and are known to fail in master.

Unit:

49 tests, 237 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed

Remote:

72 tests, 232 assertions, 2 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
97.2222% passed

Closes #3374

* Redsys: Set authorization for 3DS transactions

Ensure that the authorization field is set when performing 3DS transactions.

Remote:
22 tests, 70 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed

Unit:
36 tests, 112 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed

* Adyen: Add capture_delay_hours GSF

CE-133

* Worldpay: Update test with MOTO enabled account

MOTO is now enabled on the test account used in Worldpay remote
testing. Updates test to actually check that purchase is successful
when flagged as MOTO.

Remote:
54 tests, 232 assertions, 5 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
90.7407% passed
(5 preexisting, unrelated errors)

Unit:
67 tests, 397 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed

* Credorax: Add support for stored credentials

https://usa.visa.com/dam/VCOM/global/support-legal/documents/stored-credential-transaction-framework-vbs-10-may-17.pdf
https://epower.credorax.com/wp-content/uploads/2019/09/Credorax-Source-Payment-API-Specifications-v1.2-Rev-3.pdf
1. VISA's stored credential transaction framework does not support 'recurring' nor 'installment' transactions
   for cardholder-initiated, thus passing the 'cardholder' option will default 'a9' to '9' (Unscheduled Card-on-File
   transactions initiated by the cardholder).

2. Credorax requires a single field: 'a9' to specify the stored credential transaction type and currently does not
   support 'installment' transactions, thus passing the 'installment' and 'merchant' options will default 'a9' to '8'
   (Unscheduled Card-on-File transactions initiated by the merchant).

3. The 'transaction_type' option can still be passed directly and will override any values passed by the
   'stored_credential' options.

4. If used, the 'stored_credential_initiator' will now set the '3ds_channel' for 3DS2 transactions.

Unit:
58 tests, 264 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed

Remote:
35 tests, 128 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed

ECS-439/ECS-561

Closes https://github.com/activemerchant/active_merchant/pull/3375

* BlueSnap: Add remote tests for Cabal and Naranja

Added remote tests for the new Cabal and Naranja card types that were
previously enabled.

CE-94 / CE-111

Unit:
30 tests, 142 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions,
0 notifications
100% passed

Remote:
40 tests, 121 assertions, 1 failures, 0 errors, 0 pendings, 0 omissions,
0 notifications
97.5% passed

`test_successful_purchase_with_3ds2_auth` is now failing with the error
message "Transaction failed  because of payment processing failure.:
400540 - Authorisation failed for request 2652197". It's not clear what
is causing this error, but it doesn't seem related to these changes.

* WorldPay: Add Cabal and Naranja remote tests

Adds remote tests for both of the newly implemented card types:
 - Cabal
 - Naranja

The test card numbers for the new card types were taken directly from
WorldPay's
[documentation](https://beta.developer.worldpay.com/docs/wpg/latinamericaintegration/test).

CE-94 / CE-109

Unit:
67 tests, 397 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions,
0 notifications
100% passed

Remote:
56 tests, 240 assertions, 2 failures, 0 errors, 0 pendings, 0 omissions,
0 notifications
96.4286% passed

Failing remote tests:
 - test_3ds_version_1_parameters_pass_thru
 - test_3ds_version_2_parameters_pass_thru

These two failing tests are associated with pass-through
parameters, which were already known to not work.

* Rubocop: Indentions

Removes the rubocop todo for indention formating.

* Worldpay: Handle parse errors gracefully

We have experienced instances of Worldpay responses consisting of a
plain text string, which threw a NoMethodError when attempting to parse.
It will now return a failed Response with the raw response.
This also replaces the problematic & character in responses.

Closes #3380

Remote (3 unrelated failures):
54 tests, 235 assertions, 3 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
94.4444% passed

Unit:
68 tests, 401 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed

* Rubocop fix for prior commit

* BluePay: Allow setting DOC_TYPE in refund, credit

ACH refunds and credits require DOC_TYPE to be set to PPD or CCD
to be processed successfully. This PR adds the ability to pass in
a specific DOC_TYPE in the request.

Remote:
17 tests, 84 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed

Unit:
27 tests, 130 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed

* Moneris: Add support for stored credentials

https://usa.visa.com/dam/VCOM/global/support-legal/documents/stored-credential-transaction-framework-vbs-10-may-17.pdf
https://developer.moneris.com/Documentation/NA/E-Commerce%20Solutions/API/Purchase

This change allows for the standardization of utilizing the stored credentials framework

1. VISA's stored credential transaction framework does not support 'recurring' nor 'installment' transactions
   for cardholder-initiated, thus passing the ':cardholder' option will default ':payment_indicator' to 'C' for
   initial transactions and to 'Z' for subsequent transactions.

2. The ':issuer_id', ':payment_indicator', and ':payment_information' options can still be passed directly and
   will override any values set by the ':stored_credential' options.

Unit:
50 tests, 266 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed

Remote:
38 tests, 199 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed

ECS-422/ECS-780

* Stripe Payment Intents: Fix fallback for Store

Fixes a typo when Storing non-cards/tokens.

Closes #3343

Remote (1 failure that occurs on master as well):
29 tests, 118 assertions, 1 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
96.5517% passed

Unit:
6 tests, 42 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed

* Update Securionpay and Trexle supported countries

Closes #2472

* Visanet Peru: Add amount argument to Capture

Capture was initially implemented without an amount argument, this adds
it for the sake of standardization.

Remote tests are causing 500s with our latest test credentials, but I'm
comfortable with only unit tests since this is a fix which doesn't have
any logic behind it (we're not actually adding the amount to the
request).

Closes #3389

Unit:
15 tests, 75 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed

* Rubocop: Layout/MultilineHashBraceLayout

Ensures that closing hash braces are symmetrical to their opening braces.

* CardConnect: include additional_data in purch and auth

* CardConnect: Add user_fields GSF

CE-169

* making the change to this auth+ capture card present flow as the
following to restore non-auto capture behaviour stripe was providing
before its 2018-07-31 release. the change is the following:

1. capture set to false for authorization (param value change)
2. update the existing charge with card data (same as current flow)
3. capture by posting to the capture
 endpoint https://stripe.com/docs/api/charges/capture (completely new
 step)

note the third step above is the new step introduced in this PR to
properly catpure a non-auto capture charge. this means for each non-auto
capture scenario, we are making an additional network call to stripe.

this flow is recommended by stripe's engineer Dan Cobb:
 "1. Create the charge with emv_auth_data and capture set to false
2. Update the charge with emv_approval_data
3. Capture the charge."

 we had also tested our change in the PR through generating auth+capture
 charges successfully.

we expect this change will ensure that authorizations aren't
automatcally captured for the UK and IE API consumers to maintain the behaviour before stripe's api change in 2018-07-31 release, with one additional network call to stripe.

* Release v1.100.0

* Add 3DS2 Support to Netbanx (#3394)

* Add 3DS2 Support to Netbanx

* Netbanx update code tidy up

* Netbanx match standardized input requirements

* Netbanx add xid + slightly optimize code

* Redsys: Check for non-3DS response before attempting 3DS parse

Based on the Redsys docs, it seems that when you attempt 3DS but
3DS is not available, you will receive a direct response to your
request. Currently, we look under specific namespaces related to
the 3DS action step when performing 3DS, which would cause an error
if the service returned a direct response. This PR updates the
parse method to first look for the path //RETORNOXML/OPERACION
and if present (and successful), tries to parse the response.
Otherwise, we proceed to the 3DS specific parsing, or error
message if there was an issue.

Unfortunately, there's no way to test this in the Redsys sandbox,
but existing functionality appears in tact with this change.

Remote:
22 tests, 70 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed

Unit:
36 tests, 112 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed

* Rubocop: Style/IfUnlessModifier

Handles rubocop todo for styling one line if/unless statements.

* active merchant changes for OAuth2.0

* notes on test changes

* Revert "notes on test changes"

This reverts commit 3119f19d67cb70027c1f710a034446ea7b7704a4.

* Revert "active merchant changes for OAuth2.0"

This reverts commit ad225b7907056c8b3824861b8da95c1091222c01.

* CyberSource: Send issuer data on capture

The `issuer_additional_data` gateway specific field was previously
passed in auth and purchase requests. These fields can now also be
passed as part of capture requests.

CE-184

Unit:
63 tests, 307 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions,
0 notifications
100% passed

Remote:
64 tests, 272 assertions, 4 failures, 1 errors, 0 pendings, 0 omissions,
0 notifications
92.1875% passed

The 4 failures are unrelated to this change and appear to be persistent
throughout previous commits. The error is a timeout error that appears
to happen sporadically to random remote tests.

* Rubocop: Layout/RescueEnsureAlignment fix

Fixes the Rubocop todo item for ensuring that `rescue` statements are
aligned with `begin` statements where relevant.

* Credorax: Stop always sending r1 parameter

Credorax users must be enabled in their Credorax account to specify
their processor (via the r1 parameter). Maintains ability to pass in a
value for r1 via the processor option, and stops default sending it
with the value of CREDORAX when none is specified.

Necessary change due to an issue with a Spreedly customer having
rejected 3DS1 transactions due to inclusion of an r1 parameter in their
requests.

ECS-778

Closes #3415

Unit:
58 tests, 264 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed

Remote:
35 tests, 128 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed

* Quickbooks: Add OAuth 2.0 support, support void

Quickbooks is deprecating OAuth 1.0 support, and requiring OAuth
2.0 no later than December 17, 2019. This PR adds support for
OAuth 2.0, requiring the access_token, refresh_token, client_id
and client_secret when creating a gateway. When refresh_token is
present, OAuth 2.0 authentication will be attempted. If not
included, OAuth 1.0 will be attempted and should still work until
the deprecation date.

In the Quickbooks implementation, the access_token expires every
60 minutes and you must use the refresh_token to generate a new
one. There's no way to proactively check if the token is still
valid; you'll just see that the request fails with an
`AuthenticationFailed` error. This PR adds logic to each action to
check for this error, and attempt to refresh the token and reissue
the request when it happens.

This gateway also did not previously implement the void method;
support is added here. It required a change to authorization_from
method to include the request-id since that is needed in the void
request. The authorization value is split appropriately to parse out
the value needed for a given method.

Remote:
14 tests, 37 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed

Unit:
21 tests, 114 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed

* Add UYI to list of currencies without fractions

This brings the default list of currencies without fractions to include
all currencies noted as such in https://en.wikipedia.org/wiki/ISO_4217

Closes #3216

* OPP (Acapture): Update test cards' expirations

This change is required for remote tests to pass

ECS-825

Unit:
14 tests, 73 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed

Remote:
15 tests, 48 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed

* Release v1.101.0

* Quickbooks: Make refresh optional

While access_tokens expire every hour, there are potential
complications in refreshing them in certain workflows. Adds a flag,
`allow_refresh` to optionally refresh the access_token after making
a request. Marks as a failure if authentication failed. Also includes
a `refresh` method so that the tokens can be refreshed outside of the
other transaction processes.

Remote:
17 tests, 42 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed

Unit:
21 tests, 114 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed

* Paymentez: Update supported countries

Closes #3425

* Add gateway adapter for Ixopay

Unit:
4355 tests, 71053 assertions, 0 failures, 0 errors, 0 pendings, 2 omissions, 0 notifications
100% passed

Remote:
16 tests, 57 assertions, 0 failures, 0 errors, 0 pendings, 1 omissions, 0 notifications
100% passed

Closes #3426

* Ixopay: Refactor capture

Refactored the `capture` transaction for the new Ixopay gateway in order
to correctly use the Nokogiri::XML::Builder syntax for method names.

This greatly simplies the code while still passing all of the remote and
unit tests.

For more details, see the Nokogiri::XML::Builder documentation:
https://www.rubydoc.info/github/sparklemotion/nokogiri/Nokogiri/XML/Builder

Unit:
15 tests, 68 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions,
0 notifications
100% passed

Remote:
16 tests, 57 assertions, 0 failures, 0 errors, 0 pendings, 1 omissions,
0 notifications
100% passed

* Ixopay: Add support for currency option to refund method

Closes #3433

* Update supported countries list. Add currencies without fractions / with 3 decimal places (#3424)

* Fix Checkout.com V2 Sandbox URL

* Fix success response code validation

* Fix success response code validation v2

* Improve success response validation logic

* Add list of currencies without fractions

* Add localized_amount support to add_invoice function

* Remove redefinition of currencies_without_fractions

* Add test for Void Authorize with AVS rule

* Align with main repo

* Migrate to unified payments API

* Align to Master branch

* Update supported countries list. Add currencies without fractions / with 3 decimal places

* Fix rubocop tests

* Ixopay: Remove default callback URL

Unit:
4356 tests, 71056 assertions, 0 failures, 0 errors, 0 pendings, 2 omissions, 0 notifications
100% passed

Remote:
16 tests, 57 assertions, 0 failures, 0 errors, 0 pendings, 1 omissions, 0 notifications
100% passed

* RuboCop: Fix Layout/EndAlignment

Fixes alignment errors where `end` statements were not correctly aligned
with the associated `if` or `case` statements.

Unit:
4340 tests, 70985 assertions, 0 failures, 0 errors, 0 pendings,
2 omissions, 0 notifications
100% passed

RuboCop:
692 files inspected, no offenses detected

* RuboCop: Fix Layout/ExtraSpacing

Fixes the RuboCop Layout/ExtraSpacing errors caused by extra spaces
throughout Active Merchant.

Unit:
4340 tests, 70985 assertions, 0 failures, 0 errors, 0 pendings,
2 omissions, 0 notifications
100% passed

RuboCop:
692 files inspected, no offenses detected

* Adopt new enrolled key for 3DS1 transactions. enrolled contains the 3… (#3442)

* Adopt new enrolled key for 3DS1 transactions. enrolled contains the 3DS 1.0 enrollment response from the VERes message from the Directory Server that is mapped to the Adyen field directoryResponse

* fix test

* RuboCop: Fix Layout/MultilineOperationIndentation

Fixes the multiline operation indentation for RuboCop.

Unit:
4356 tests, 71056 assertions, 0 failures, 0 errors, 0 pendings, 2 omissions,
0 notifications
100% passed

RuboCop:
695 files inspected, no offenses detected

* Worldpay: Update cardholder name logic based on 3DS version

In testing with Worldpay, there was some unexpected behavior when
the 3DS version was 2. The existing regex match didn't capture the
value of `2` as being equivalent to a 3DS2 version, and so the
cardholder name was getting set to '3D'. This update uses
`start_with?` to capture any version value that starts with `2`,
including `2`. Unit tests have also been updated to test various
permutations of 3DS2 version values.

Remote:
56 tests, 240 assertions, 2 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
96.4286% passed
(pre-existing failures)

Unit:
69 tests, 411 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed

* Release 1.102.0

* Quickbooks: Mark AuthorizationFailed responses as failures

When an access_token has insufficient scope, a merchant will
receive the code AuthorizationFailed, rather than
AuthenticationFailed. This update checks for this error code
and marks such transactions as failures.

Unit:
22 tests, 118 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed

Remote:
17 tests, 42 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed

* Fix changelog

Move Quickbooks commit to HEAD

* Credorax: Support referral CFT transactions

Added support for the referral CFT transaction type on the Credorax
gateway (operation code [34]).

To simplify this new transaction type, it is selected by passing a new
`referral_cft` gateway specific field while requesting a `refund`
transaction.

Although the referral CFT transaction defaults to a credit
request when it has not been enabled on the Credorax gateway
integration, the referral CFT requires passing a `g2` value, i.e.,
"Previous Response ID". Therefore, because this transaction type
requires a reference authorization from a previous transaction, its
implmentation was more similar to a refund than a credit.

CE-203

Unit:
60 tests, 286 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions,
0 notifications
100% passed

Remote:
37 tests, 138 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions,
0 notifications
100% passed

* DLocal: Updates for version 2.1

DLocal has updated its Auth/Capture flow, now accepting captures at a
new endpoint. It has also changed to use an authorization_id parameter
for referencing Authorize transactions (needed in capture and void
requests).

Remote:
26 tests, 69 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed

Unit:
17 tests, 67 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed

ECS-565

Closes #3449

* Adyen: Allow the use of the storeToken endpoint for store

The store action currently uses the /authorise endpoint when executing
the store call. While Adyen does return the recurringDetailReference in
the authorize response, there are some drawbacks to using this endpoint
if you are looking for a pure tokenize call to store payment details at
Adyen with no additional side effects.

1. The /authorise endpoint will run a full authorization at the issuing
bank meaning the authorize request itself could fail preventing a full
tokenize at Adyen despite there being nothing inherently wrong with the
card itself.

2. It's possible for a response from the authorize call to respond with
a 3DS flow which would be suboptimal if you're not interested in doing
that at the particular time of storing the card.

This PR is meant to be a starting point for iteration on adding support
for the use of storeToken. As always there are always backwards
compatibility considerations and ensuring that both forms of
tokenizing at Adyen can work together seamlessly. My hope is that this
gives a good foundation with a real remote test for introspecting and
determining a best path forward.

As a side note: storeToken is only available if a specific role is added
to your user in Adyen so it's not universally available out of the box.

A couple notes about this particular implementation:

* Because this is a feature Adyen switches on a per account basis, it's
opt-in with the default being the current implementation then the added
ability to pass in a new option for using /storeToken instead.

* The url building had to be altered a bit since there's no version in
the URL for storeToken AND it's a different sub resource ("Recurring")

* I tried to ensure there was backwards compatibility will all other
actions by only appending new checks. But I think this needs an extra
close look.

* There are 2 failing remote tests around 3DS that I don't believe are
related to this in any way. But worth a second set of eyes.

* CyberSource: Send MDD on capture

The merchant defined data gateway specific fields are now able to be
sent on capture requests in addition to the previously available
purchase and authorize requests.

CE-234

Unit:
64 tests, 310 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions,
0 notifications
100% passed

Remote:
65 tests, 278 assertions, 5 failures, 0 errors, 0 pendings, 0 omissions,
0 notifications
92.3077% passed

The 5 remote failures seem to be previously existing and unrelated:
 - test_successful_3ds_validate_authorize_request
 - test_successful_3ds_validate_purchase_request
 - test_successful_pinless_debit_card_puchase
 - test_successful_tax_calculation
 - test_successful_validate_pinless_debit_card

* Ixopay: Implement extraData GSF

CE-144

Clean up whitespace

* Update changelog for #3450

* CyberSource: Fix XML error on capture

Fixes an XML parsing error in `capture` requests on CyberSource.

In [a previous commit](https://github.com/activemerchant/active_merchant/commit/35b5dd95db0252c7b98d8411fd3adb50fc266eb8),
the `add_mdd_fields` method was added to `capture` transaction requests.
However, these fields are required to be passed in a specific location
within the XML request sent to the CyberSource gateway.

This commit moves the `add_mdd_fields` method within `capture` to the
correct location for XML parsing by the CyberSource gateway.

CE-234

Unit:
64 tests, 310 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions,
0 notifications
100% passed

Remote:
65 tests, 278 assertions, 5 failures, 0 errors, 0 pendings, 0 omissions,
0 notifications
92.3077% passed

The 5 remote failures seem to be previously existing and unrelated:

 - test_successful_3ds_validate_authorize_request
 - test_successful_3ds_validate_purchase_request
 - test_successful_pinless_debit_card_puchase
 - test_successful_tax_calculation
 - test_successful_validate_pinless_debit_card

* Adyen: Add gateway specific field for splits

Added the `splits` gateway specific field to the Adyen gateway.

For more details, see the Adyen documentation:
[Adyen API
Reference](https://docs.adyen.com/api-explorer/#/PaymentSetupAndVerificationService/v50/payments__reqParam_splits)
[Adyen MarketPlace information about
splits](https://docs.adyen.com/marketpay/processing-payments#providing-split-information)

CE-220

Unit:
51 tests, 243 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions,
0 notifications
100% passed

Remote:
73 tests, 234 assertions, 2 failures, 0 errors, 0 pendings, 0 omissions,
0 notifications
97.2603% passed

The two failing remote tests are
 - `test_successful_purchase_with_auth_data_via_threeds1_standalone`
 - `test_successful_purchase_with_auth_data_via_threeds2_standalone`
These have been failing for a while and are unrelated.

* Borgun: Update card for remote tests

Takes failures from 9 down to 1, failing test follows expected behavior
described in the comment.

Remote:
20 tests, 45 assertions, 1 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
95% passed

* Adyen: Adds Unstore

This adds an `unstore` method using the `disable` action. Adyen provides
a different API for `disable` and so this also adjusts the url to
use `/Recurring`, instead of `/Payment`, when `disable` is called. It
also adds separate versioning for each.

In addition to `merchantAccount`, there are two additional fields
required for this action: `shopperReference` and
`recurringDetailReference`.

Unit Tests:
52 tests, 247 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions,
0 notifications
100% passed

Remote Tests:
74 tests, 244 assertions, 2 failures, 0 errors, 0 pendings, 0 omissions,
0 notifications
97.2973% passed

(These two failing tests are unrelated to the proposed changes. They
both fail on master. They are the tests ending with
`threeds1_standalone` and `threeds2_standalone`.)

* Barclaycard Smartpay: Allow direct exemption requests

As a whitelabel of Adyen, Barclay also allows you to request
exemptions directly via the api. Updates the gateway to permit
`sca_exemption` option that will be populated for 3DS2 txns where
`execute_threed` option is passed.

Unit
34 tests, 167 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed

Remote
38 tests, 98 assertions, 1 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
97.3684% passed
(unrelated preexisting failure: test_successful_third_party_payout)

* Use null@cybersource.com when option[:email] is an empty string (#3462)

We've had some cases where email ends up being sent as an empty string
and the current logic only checks for it's existence, not for its value.
We should use null@cybersource.com for both `nil` and `""`.

* Bump to v1.103.0

* Quickbooks: Mark transactions that returned `AuthorizationFailed` as failures [britth] #3447
* Credorax: Add referral CFT transactions [leila-alderman] #3432
* DLocal: Updates for version 2.1 [molbrown] #3449
* CyberSource: Send MDD on capture [leila-alderman] #3453
* Ixopay: Include extra_data gateway specific field [therufs] #3450
* CyberSource: Fix XML error on capture [leila-alderman] #3454
* Adyen: Add gateway specific field for splits [leila-alderman] #3448
* Adyen: Add `unstore` and `storeToken` actions with '/Recurring' endp…
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

3 participants