Money Out Hooks

SaveAdjustments

Namespace: DirectScale.Disco.Extension.Hooks.Merchants.MoneyOut

Basic Implementation

public class ACHUS : IHook<SaveAdjustmentsHookRequest, SaveAdjustmentsHookResponse>
{
  public SaveAdjustments() { }

  public SaveAdjustmentsHookResponse Invoke(SaveAdjustmentsHookRequest request, Func<SaveAdjustmentsHookRequest, SaveAdjustmentsHookResponse> func)
  {
    return func(request);
  }
}

Register Hook

services.AddTransient<IHook<SaveAdjustmentsHookRequest, SaveAdjustmentsHookResponse>();

Request Model

{
  "Adjustments": null,
  "SingleAdjustmentOnly": false
}

Response Model

{
  "Adjustments": null
}

ACH Hooks

using DirectScale.Disco.Extension.Hooks.Merchants.MoneyOut.Ach;

The following Hooks are specific to ACH (Automated Clearing House) payment integration.

AchUS

Set up ACH for the United States (US).

Basic Implementation

public class AchUS: IHook<AchUSFileWriterHookRequest, AchUSFileWriterHookResponse>
{
  public AchUS() { }

  public AchUSFileWriterHookResponse Invoke(AchUSFileWriterHookRequest request, Func<AchUSFileWriterHookRequest, AchUSFileWriterHookResponse> func)
  {
    return func(request);
  }
}

Register Hook

services.AddTransient<IHook<AchUSFileWriterHookRequest, AchUSFileWriterHookResponse>, ACHUS>();

Request Model

{
  "Payments": null
}

Response Model

{
  "BatchFileData": "AA=="
}

AchJP

Set up ACH for Japan (JP).

Basic Implementation

public class AchJP: IHook<AchJPFileWriterHookRequest, AchJPFileWriterHookResponse>
{
  public AchJP() { }

  public AchJPFileWriterHookResponse Invoke(AchJPFileWriterHookRequest request, Func<AchJPFileWriterHookRequest, AchJPFileWriterHookResponse> func)
  {
    return func(request);
  }
}

Register Hook

services.AddTransient<IHook<AchJPFileWriterHookRequest, AchJPFileWriterHookResponse>, AchJP>();

Request Model

{
  "Payments": null
}

Response Model

{
  "BatchFileData": "AA=="
}

AchTW

Set up ACH for Taiwan (TW).

Basic Implementation

public class AchTW: IHook<AchTWFileWriterHookRequest, AchTWFileWriterHookResponse>
{
  public AchTW() { }

  public AchTWFileWriterHookResponse Invoke(AchTWFileWriterHookRequest request, Func<AchTWFileWriterHookRequest, AchTWFileWriterHookResponse> func)
  {
    return func(request);
  }
}

Register Hook

services.AddTransient<IHook<AchTWFileWriterHookRequest, AchTWFileWriterHookResponse>, AchTW>();

Request Model

{
  "Payments": null
}

Response Model

{
  "BatchFileData": "AA=="
}
Was this article helpful?
0 out of 0 found this helpful
Previous Next

Comments

0 comments

Please sign in to leave a comment.