PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Hook to Filter initial (AIM) transaction before ARB Subscription is created

  1. tex77
    Member

    In the Authorize.net add-on, you have some hooks to filter the transaction/request before it's sent to the AuthNet api.

    make_product_payment() has gform_authorizenet_before_single_payment, which works for the AIM api.

    start_subscription() has gform_authorizenet_before_start_subscription, which works for the ARB api (for the subscription).

    But start_subscription() ALSO runs a preliminary AIM call -- get_initial_transaction(), which is NOT filtered by a hook! You do have a filter for if there's a Trial Period, but otherwise, not.

    I think it should be around line 1944:

    $transaction = apply_filters("gform_authorizenet_before_initial_transaction", $transaction, $form_data, $config, $form);
    $aim_response = $transaction->authorizeAndCapture();
    Posted 6 years ago on Tuesday February 12, 2013 | Permalink
  2. I'll bring this to the attention of the development team.

    Posted 6 years ago on Wednesday February 13, 2013 | Permalink
  3. Thanks for the heads up. It makes sense. I have added this to our dev version and it will be available when the next version of the Add-On is released. I haven't made any changes to it, so you can keep this line in your code and you should be OK when upgrading.

    Posted 6 years ago on Wednesday February 13, 2013 | Permalink

This topic has been resolved and has been closed to new replies.