Skip to content

Commit 79989db

Browse files
committed
+ (Event) Fixed Saved ACH accounts to not show in Event Registrations when Use Allow ACH processing for Events is disabled for MyWell gateway. (Fixes #6133)
1 parent 3bdd106 commit 79989db

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

Diff for: Rock.Blocks/Event/RegistrationEntry.cs

+2-1
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,7 @@ private static class AttributeKey
154154
public const string ForceEmailUpdate = "ForceEmailUpdate";
155155
public const string ShowFieldDescriptions = "ShowFieldDescriptions";
156156
public const string EnableSavedAccount = "EnableSavedAccount";
157+
public const string EnableACHForEvents = "Ach";
157158
}
158159

159160
/// <summary>
@@ -4674,7 +4675,7 @@ private RegistrationEntrySuccessBag GetSuccessViewModel( int registrationId, str
46744675
/// <returns>A list of <see cref="DefinedValueCache"/> objects that represent the currency types.</returns>
46754676
private List<DefinedValueCache> GetAllowedCurrencyTypes( GatewayComponent gatewayComponent )
46764677
{
4677-
var enableACH = true;// this.GetAttributeValue( AttributeKey.EnableACH ).AsBoolean();
4678+
var enableACH = gatewayComponent.GetAttributeValue( AttributeKey.EnableACHForEvents ).AsBoolean();
46784679
var enableCreditCard = true;// this.GetAttributeValue( AttributeKey.EnableCreditCard ).AsBoolean();
46794680
var creditCardCurrency = DefinedValueCache.Get( Rock.SystemGuid.DefinedValue.CURRENCY_TYPE_CREDIT_CARD.AsGuid() );
46804681
var achCurrency = DefinedValueCache.Get( Rock.SystemGuid.DefinedValue.CURRENCY_TYPE_ACH.AsGuid() );

Diff for: RockWeb/Blocks/Event/RegistrationEntry.ascx.cs

+5-1
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,7 @@ private static class AttributeKey
146146
public const string ForceEmailUpdate = "ForceEmailUpdate";
147147
public const string ShowFieldDescriptions = "ShowFieldDescriptions";
148148
public const string EnableSavedAccount = "EnableSavedAccount";
149+
public const string EnableACHForEvents = "Ach";
149150
}
150151

151152
#region Fields
@@ -6184,7 +6185,10 @@ private void CreateSummaryControls( bool setValues )
61846185
var component = RegistrationTemplate.FinancialGateway.GetGatewayComponent();
61856186
if ( component != null )
61866187
{
6187-
BindSavedAccounts( component );
6188+
if ( RegistrationTemplate.FinancialGateway.GetAttributeValue( AttributeKey.EnableACHForEvents ).AsBoolean() )
6189+
{
6190+
BindSavedAccounts( component );
6191+
}
61886192

61896193
if ( rblSavedCC.Items.Count > 0 )
61906194
{

0 commit comments

Comments
 (0)