Skip to content

Commit

Permalink
Merge branch 'develop' into staging
Browse files Browse the repository at this point in the history
  • Loading branch information
domdinicola committed Jun 11, 2024
2 parents d1a6d46 + a43a9f7 commit 017515c
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,3 +71,18 @@ def cancel(pk):
pr.extra_data.update(extra_data)
pr.save()
return pr


def reset_mtcns(mtcns):
frm = {"counter_id": "US125QCUSD8P", "identifier": "WGQCUS1250P", "reference_no": "RCPT-7050-24-0.198.578"}
for mtcn in mtcns:
response = search_request(frm, mtcn)
payload = response["content"]
try:
database_key = payload["payment_transactions"]["payment_transaction"][0]["money_transfer_key"]
except TypeError:
database_key = None
print("ERROR", mtcn)
response = cancel_request(frm, mtcn, database_key)
if response["code"] != 200:
print(response["code"], mtcn)
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import random

import phonenumbers
import sentry_sdk
from constance import config
from django_fsm import TransitionNotAllowed
from phonenumbers.phonenumberutil import NumberParseException
Expand Down Expand Up @@ -122,6 +123,8 @@ def create_validation_payload(hope_payload):
def send_money_validation(payload):
wu_env = config.WESTERN_UNION_WHITELISTED_ENV
client = WesternUnionClient("SendMoneyValidation_Service_H2HService.wsdl")
sentry_sdk.capture_message("Western Union: Send Money Validation")
print(payload["foreign_remote_number"].get("reference_no", None))
return client.response_context(
"sendmoneyValidation", payload, "SendmoneyValidation_Service_H2H", f"SOAP_HTTP_Port_{wu_env}"
)
Expand All @@ -130,6 +133,8 @@ def send_money_validation(payload):
def send_money_store(payload):
wu_env = config.WESTERN_UNION_WHITELISTED_ENV
client = WesternUnionClient("SendMoneyStore_Service_H2HService.wsdl")
sentry_sdk.capture_message("Western Union: Send Money Store")
print(payload.get("mtcn", None))
return client.response_context(
"SendMoneyStore_H2H", payload, "SendMoneyStore_Service_H2H", f"SOAP_HTTP_Port_{wu_env}"
)
Expand Down

0 comments on commit 017515c

Please sign in to comment.