diff --git a/backend/hct_mis_api/apps/payment/services/payment_gateway.py b/backend/hct_mis_api/apps/payment/services/payment_gateway.py index 155daf63f11..598cae88a08 100644 --- a/backend/hct_mis_api/apps/payment/services/payment_gateway.py +++ b/backend/hct_mis_api/apps/payment/services/payment_gateway.py @@ -117,7 +117,7 @@ def get_payload(self, obj: Payment) -> Dict: destination_currency: str # "USD" """ return { - "amount": int(obj.entitlement_quantity * 100), + "amount": int(obj.entitlement_quantity), "phone_no": str(obj.collector.phone_no), "last_name": obj.collector.family_name, "first_name": obj.collector.given_name, @@ -145,7 +145,7 @@ class PaymentRecordData(FlexibleArgumentsDataclassMixin): parent: str status: str hope_status: str - extra_data: dict + auth_code: str fsp_code: str message: Optional[str] = None @@ -391,7 +391,7 @@ def update_payment( _payment.reason_for_unsuccessful_payment = matching_pg_payment.message update_fields.append("reason_for_unsuccessful_payment") - delivered_quantity = matching_pg_payment.extra_data.get("delivered_quantity", None) + delivered_quantity = matching_pg_payment.auth_code if _payment.status in [ Payment.STATUS_SUCCESS, Payment.STATUS_DISTRIBUTION_SUCCESS, diff --git a/backend/hct_mis_api/config/env.py b/backend/hct_mis_api/config/env.py index aef3ca842b7..4c291e862ca 100644 --- a/backend/hct_mis_api/config/env.py +++ b/backend/hct_mis_api/config/env.py @@ -102,7 +102,7 @@ ), "MATOMO_TRACKER_URL": ( str, - "", + "https://unisitetracker.unicef.io/", ), "MATOMO_SCRIPT_URL": ( str,