Skip to content

Commit

Permalink
tweaks PG
Browse files Browse the repository at this point in the history
  • Loading branch information
domdinicola committed May 12, 2024
1 parent 1949fda commit 1a0cfcd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions backend/hct_mis_api/apps/payment/services/payment_gateway.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion backend/hct_mis_api/config/env.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@
),
"MATOMO_TRACKER_URL": (
str,
"",
"https://unisitetracker.unicef.io/",
),
"MATOMO_SCRIPT_URL": (
str,
Expand Down

0 comments on commit 1a0cfcd

Please sign in to comment.