Skip to content

Commit f33710b

Browse files
committed
EFT - NSF / Outstanding balance flow fixes
1 parent 0decdb9 commit f33710b

File tree

6 files changed

+13
-9
lines changed

6 files changed

+13
-9
lines changed

auth-web/package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

auth-web/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "auth-web",
3-
"version": "2.7.6",
3+
"version": "2.7.7",
44
"appName": "Auth Web",
55
"sbcName": "SBC Common Components",
66
"private": true,

auth-web/src/components/pay/OutstandingBalances.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ export default defineComponent({
252252
253253
const handlePayment = async () => {
254254
state.handlingPayment = true
255-
const payment: Payment = await orgStore.createOutstandingAccountPayment()
255+
const payment: Payment = await orgStore.createOutstandingAccountPayment(true)
256256
const baseUrl = ConfigHelper.getAuthContextPath()
257257
const queryParams = `?paymentId=${payment?.id}&changePaymentType=${props.changePaymentType}`
258258
const returnUrl = `${baseUrl}/${Pages.MAIN}/${props.orgId}/${Pages.PAY_OUTSTANDING_BALANCE}${queryParams}`

auth-web/src/services/payment.services.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,8 +204,12 @@ export default class PaymentService {
204204
return axios.post(`${ConfigHelper.getPayAPIURL()}/accounts/${accountId}/payments?retryFailedPayment=true`, {})
205205
}
206206

207-
static createOutstandingAccountPayment (accountId: string | number) :AxiosPromise<Payment> {
208-
return axios.post(`${ConfigHelper.getPayAPIURL()}/accounts/${accountId}/payments?retryFailedPayment=true&payOutstandingBalance=true`, {})
207+
static createOutstandingAccountPayment (accountId: string | number, allInvoiceStatuses: boolean) :AxiosPromise<Payment> {
208+
let url = `${ConfigHelper.getPayAPIURL()}/accounts/${accountId}/payments?retryFailedPayment=true&payOutstandingBalance=true`
209+
if (allInvoiceStatuses) {
210+
url = `${url}&allInvoiceStatuses=true`
211+
}
212+
return axios.post(url, {})
209213
}
210214

211215
static getRevenueAccountDetails (accountId: number): AxiosPromise<any> {

auth-web/src/stores/org.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -824,8 +824,8 @@ export const useOrgStore = defineStore('org', () => {
824824
setCurrentOrganizationPADInfo(undefined)
825825
}
826826

827-
async function createOutstandingAccountPayment () {
828-
const response = await PaymentService.createOutstandingAccountPayment(state.currentOrganization.id)
827+
async function createOutstandingAccountPayment (allInvoiceStatuses: boolean) {
828+
const response = await PaymentService.createOutstandingAccountPayment(state.currentOrganization.id, allInvoiceStatuses)
829829
return response?.data || {}
830830
}
831831

auth-web/src/views/auth/account-freeze/AccountFreezeUnlockView.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ export default defineComponent({
191191
let payment
192192
try {
193193
if (state.hasEFTPaymentMethod) {
194-
payment = await createOutstandingAccountPayment()
194+
payment = await createOutstandingAccountPayment(false)
195195
} else {
196196
payment = await createAccountPayment()
197197
}

0 commit comments

Comments
 (0)