While testing for issue 2965800, I discovered that the update from commit #c65e90993f8b4919ed427043ace4e960202092e0 (pre accept.js) to commit #2b41b977e4 (post accept.js) made the following settings changes:

  • lost the login ID
  • lost the transaction key
  • the default transaction type switched from "Authorization and capture" to "Authorization only"
  • In addition, I needed to add the client key which is required by Accept.js and was not required earlier.

I filled these in before doing any testing, and the tests were successful.

Comments

Adrian83 created an issue. See original summary.

mglaman’s picture

This is in reference to: commerce_authnet_post_update_echeck

See http://cgit.drupalcode.org/commerce_authnet/commit/?id=365ce4922fa01abe1...

The gateway plugin is split into two different gateways. So the Client ID issue existed before this.

mglaman’s picture

Issue summary: View changes

Updating to strike out "the default transaction type switched from "Authorization and capture" to "Authorization only". This is handled by the checkout flow directly. See #2953806: Setting gateway to "authorization only" has no effect?

mglaman’s picture

StatusFileSize
new6.21 KB

Started to write test.

Time: 6.37 seconds, Memory: 6.00MB

There was 1 error:

1) Drupal\Tests\commerce_authnet\Kernel\PluginUpgradeTest::testBasicUpgrade
Drupal\Component\Plugin\Exception\PluginNotFoundException: The "authorizenet" plugin does not exist.

Need to generate a database fixture to test with, using old revision like 0fb85dcbf46cf4fe4b1942a56af7fee66e36a484.

mglaman’s picture

Status: Active » Needs review

Status: Needs review » Needs work

The last submitted patch, 4: 2966612-4.patch, failed testing. View results

mglaman’s picture

Assigned: Unassigned » mglaman

Creating a test fixture based on the commit 0fb85dcbf46cf4fe4b1942a56af7fee66e36a484

mglaman’s picture

Status: Needs work » Needs review
StatusFileSize
new1.85 MB

Here is a test with a fixture that upgrades a gateway plugin made on c65e90993f8b4919ed427043ace4e960202092e0 and upgraded.

--- Expected
+++ Actual
@@ @@
 Array (
     'mode' => 'test'
-    'api_login' => 'TESTING_WITH_FAKE_LOGIN_ID'
-    'transaction_key' => 'TESTING_WITH_FAKE_TRANSACTION_KEY'
+    'api_login' => ''
+    'transaction_key' => ''
     'client_key' => ''
     'display_label' => 'Authorize.net'
     'payment_method_types' => Array (...)
 )

Status: Needs review » Needs work

The last submitted patch, 8: 2966612-8.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

mglaman’s picture

Status: Needs work » Needs review
StatusFileSize
new1.85 MB

Found the problem. Setting the plugin ID purges the configuration. Uploading a patch which fails and has the fix commented out.

  /**
   * {@inheritdoc}
   */
  public function setPluginId($plugin_id) {
    $this->plugin = $plugin_id;
    $this->configuration = [];
    $this->pluginCollection = NULL;
    return $this;
  }

Status: Needs review » Needs work

The last submitted patch, 10: 2966612-10.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

mglaman’s picture

Status: Needs work » Needs review
StatusFileSize
new1.85 MB
mglaman’s picture

Assigned: mglaman » Unassigned

Okay, next steps:

* Clean up
* Move communication about missing the client key to a follow-up.

This initial regression was due to the eCheck split. However, we uncovered a different upgrade issue along the way.

mglaman’s picture

StatusFileSize
new1.85 MB

Here is the patch I plan to commit.

mglaman’s picture

StatusFileSize
new7.34 KB

Here is a patch with the test fixture gzipped to save some disk space.

Status: Needs review » Needs work

The last submitted patch, 15: 2966612-15.patch, failed testing. View results

mglaman’s picture

StatusFileSize
new170.31 KB

Missing binary file

mglaman’s picture

Status: Needs work » Needs review
mglaman’s picture

Title: Gateway settings lost during upgrade to latest dev » Gateway settings lost during upgrade for AcceptJS and eCheck plugin split

Update title to be more precise.

  • mglaman committed c3e9c0f on 8.x-1.x
    Issue #2966612 by mglaman, Adrian83: Gateway settings lost during...
mglaman’s picture

Status: Needs review » Fixed

Fixed! Opening a follow up for the AcceptJS token messaging.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.