Skip to content

Commit

Permalink
Update ScheduledTransactionEditV2.ascx.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorbrooks committed Sep 11, 2023
1 parent c54c65d commit b00b75b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions RockWeb/Blocks/Finance/ScheduledTransactionEditV2.ascx.cs
Original file line number Diff line number Diff line change
Expand Up @@ -841,6 +841,7 @@ protected void UpdateScheduledPayment( bool usePaymentToken, string paymentToken
referencePaymentInfo = new ReferencePaymentInfo();
referencePaymentInfo.GatewayPersonIdentifier = financialScheduledTransaction.FinancialPaymentDetail.GatewayPersonIdentifier;
referencePaymentInfo.FinancialPersonSavedAccountId = financialScheduledTransaction.FinancialPaymentDetail.FinancialPersonSavedAccountId;
referencePaymentInfo.ReferenceNumber = financialGatewayComponent.GetReferenceNumber( scheduledTransaction, out errorMessage );
}
else if ( useSavedAccount )
{
Expand Down Expand Up @@ -883,7 +884,10 @@ protected void UpdateScheduledPayment( bool usePaymentToken, string paymentToken
var originalGatewayScheduleId = financialScheduledTransaction.GatewayScheduleId;
try
{
financialScheduledTransaction.FinancialPaymentDetail.ClearPaymentInfo();
if ( usePaymentToken )
{
financialScheduledTransaction.FinancialPaymentDetail.ClearPaymentInfo();
}
var successfullyUpdated = financialGatewayComponent.UpdateScheduledPayment( financialScheduledTransaction, referencePaymentInfo, out errorMessage );

if ( !successfullyUpdated )
Expand Down Expand Up @@ -1013,4 +1017,4 @@ protected void btnChangeToHostedPayment_Click( object sender, EventArgs e )
}

#endregion Events
}
}

0 comments on commit b00b75b

Please sign in to comment.