diff --git a/auth-api/src/auth_api/services/activity_log.py b/auth-api/src/auth_api/services/activity_log.py
index 9a96da217..6eb5e80d4 100644
--- a/auth-api/src/auth_api/services/activity_log.py
+++ b/auth-api/src/auth_api/services/activity_log.py
@@ -79,9 +79,9 @@ def fetch_activity_logs(org_id: int, **kwargs): # pylint: disable=too-many-loca
activity_log: ActivityLogModel = result[0]
log_dict = ActivityLogSchema(exclude=('actor_id',)).dump(activity_log)
- if user := result[1]:
- actor = ActivityLog._mask_user_name(is_staff_access, user)
- log_dict['actor'] = actor
+ user = result[1]
+ actor = ActivityLog._mask_user_name(is_staff_access, user)
+ log_dict['actor'] = actor
log_dict['action'] = ActivityLog._build_string(activity_log)
logs['activity_logs'].append(log_dict)
@@ -208,6 +208,8 @@ def _removing_products_and_services(activity: ActivityLogModel) -> str:
@ staticmethod
def _mask_user_name(is_staff_access, user):
+ if user is None:
+ return 'Service Account'
is_actor_a_staff = user.type == Role.STAFF.name
if not is_staff_access and is_actor_a_staff:
actor = 'BC Registry Staff'
diff --git a/auth-web/src/components/pay/PayWithCreditCard.vue b/auth-web/src/components/pay/PayWithCreditCard.vue
index 3e2dddc2c..41162681a 100644
--- a/auth-web/src/components/pay/PayWithCreditCard.vue
+++ b/auth-web/src/components/pay/PayWithCreditCard.vue
@@ -4,8 +4,8 @@
Balance Due: ${{totalBalanceDue.toFixed(2)}}
- Credit card will be the only payment option for this transaction.
- Online banking payment option is not available.
+ Credit card is the only payment option for this transaction.
+ Online Banking is not available for this transaction.
You can't use your account credit with credit card payment.
diff --git a/auth-web/src/services/payment.services.ts b/auth-web/src/services/payment.services.ts
index 023faf3dd..a6fd51ba5 100644
--- a/auth-web/src/services/payment.services.ts
+++ b/auth-web/src/services/payment.services.ts
@@ -30,12 +30,15 @@ export default class PaymentService {
return axios.get(`${ConfigHelper.getPayAPIURL()}/payment-requests/${invoiceId}`, { headers: headers })
}
- static updateInvoicePaymentMethodAsCreditCard (paymentId: string): AxiosPromise {
+ static updateInvoicePaymentMethodAsCreditCard (paymentId: string, accountId: number): AxiosPromise {
+ const headers = accountId ? { 'Account-Id': accountId } : {}
const url = `${ConfigHelper.getPayAPIURL()}/payment-requests/${paymentId}`
return axios.patch(url, {
paymentInfo: {
methodOfPayment: PaymentTypes.CREDIT_CARD
}
+ }, {
+ headers: headers
}
)
}
diff --git a/auth-web/src/store/modules/org.ts b/auth-web/src/store/modules/org.ts
index d2dd8e694..de7768642 100644
--- a/auth-web/src/store/modules/org.ts
+++ b/auth-web/src/store/modules/org.ts
@@ -955,8 +955,8 @@ export default class OrgModule extends VuexModule {
}
@Action({ rawError: true })
- public async updateInvoicePaymentMethodAsCreditCard (paymentId: string) {
- const response = await PaymentService.updateInvoicePaymentMethodAsCreditCard(paymentId)
+ public async updateInvoicePaymentMethodAsCreditCard (invoicePayload) {
+ const response = await PaymentService.updateInvoicePaymentMethodAsCreditCard(invoicePayload.paymentId, invoicePayload.accountId)
return response?.data || {}
}
diff --git a/auth-web/src/views/pay/PaymentView.vue b/auth-web/src/views/pay/PaymentView.vue
index 2197d532c..5d6862b35 100644
--- a/auth-web/src/views/pay/PaymentView.vue
+++ b/auth-web/src/views/pay/PaymentView.vue
@@ -85,7 +85,7 @@ export default class PaymentView extends Vue {
@Prop({ default: '' }) paymentId: string
@Prop({ default: '' }) redirectUrl: string
private readonly createTransaction!: (transactionData) => any
- private readonly updateInvoicePaymentMethodAsCreditCard!: (paymentId: string) => any
+ private readonly updateInvoicePaymentMethodAsCreditCard!: (invoicePayload) => any
private readonly downloadOBInvoice!: (paymentId: string) => any
private readonly getOrgPayments!: (orgId: number) => OrgPaymentDetails
private readonly getInvoice!: (invoicePayload) => Invoice
@@ -162,7 +162,8 @@ export default class PaymentView extends Vue {
// patch the transaction
// redirect for payment
try {
- await this.updateInvoicePaymentMethodAsCreditCard(this.paymentId)
+ const accountSettings = this.getAccountFromSession()
+ await this.updateInvoicePaymentMethodAsCreditCard({ paymentId: this.paymentId, accountId: accountSettings?.id })
await this.doCreateTransaction()
} catch (error) {
this.doHandleError(error)