Skip to content

Commit

Permalink
fix: some issues with the processing of MBWay
Browse files Browse the repository at this point in the history
  • Loading branch information
joamag committed Jan 3, 2025
1 parent cc0a202 commit 1e24abd
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 17 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
container: python:${{ matrix.python-version }}
steps:
- uses: actions/checkout@v4
- run: |
- run: |
curl -fsSL https://pgp.mongodb.com/server-7.0.asc | gpg -o /usr/share/keyrings/mongodb-server-7.0.gpg --dearmor
echo "deb [ signed-by=/usr/share/keyrings/mongodb-server-7.0.gpg ] http://repo.mongodb.org/apt/debian $(. /etc/os-release && echo "$VERSION_CODENAME")/mongodb-org/7.0 main" | tee /etc/apt/sources.list.d/mongodb-org-7.0.list
apt-get update && apt-get install -y mongodb-org mongodb-org-server mongodb-org-database\
Expand Down Expand Up @@ -59,7 +59,7 @@ jobs:
container: pypy:${{ matrix.python-version }}
steps:
- uses: actions/checkout@v4
- run: |
- run: |
curl -fsSL https://pgp.mongodb.com/server-7.0.asc | gpg -o /usr/share/keyrings/mongodb-server-7.0.gpg --dearmor
echo "deb [ signed-by=/usr/share/keyrings/mongodb-server-7.0.gpg ] http://repo.mongodb.org/apt/debian $(. /etc/os-release && echo "$VERSION_CODENAME")/mongodb-org/7.0 main" | tee /etc/apt/sources.list.d/mongodb-org-7.0.list
apt-get update && apt-get install -y mongodb-org mongodb-org-server mongodb-org-database\
Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Fixed

*
* Issues with the processing of MBWay

## [0.8.12] - 2025-01-03

Expand Down
39 changes: 25 additions & 14 deletions src/budy/models/order.py
Original file line number Diff line number Diff line change
Expand Up @@ -1822,20 +1822,31 @@ def _pay_easypay_v2(self, payment_data, warning_d=None, cancel_d=None):
warning=int(time.time() + warning_d) if warning_d else None,
cancel=int(time.time() + cancel_d) if cancel_d else None,
)
entity = payment["entity"]
reference = payment["reference"]
identifier = payment["identifier"]
warning = payment["warning"]
cancel = payment["cancel"]
self.payment_data = dict(
engine="easypay_v2",
type=type,
entity=entity,
reference=reference,
identifier=identifier,
warning=warning,
cancel=cancel,
)
if type == "multibanco":
entity = payment["entity"]
reference = payment["reference"]
identifier = payment["identifier"]
warning = payment["warning"]
cancel = payment["cancel"]
customer = payment.get("customer", None)
self.payment_data = dict(
engine="easypay_v2",
type=type,
entity=entity,
reference=reference,
identifier=identifier,
customer=customer,
warning=warning,
cancel=cancel,
)
elif type == "mbway":
identifier = payment["identifier"]
warning = payment["warning"]
cancel = payment["cancel"]
customer = payment.get("customer", None)
self.payment_data = dict(
engine="easypay_v2", type=type, identifier=identifier, customer=customer
)
return False

def _pay_paypal(self, payment_data):
Expand Down

0 comments on commit 1e24abd

Please sign in to comment.