Skip to content

Commit

Permalink
Merge pull request #17 from gopaycommunity:embed-url-fix
Browse files Browse the repository at this point in the history
Fix embed URL, #17
  • Loading branch information
geeshta authored Jun 23, 2023
2 parents ad44737 + 74a0278 commit a5d9e2f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion gopay/payments.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,4 +142,4 @@ def find_eet_receipts_by_filter(self, filter: dict) -> Response:

@property
def get_embedjs_url(self) -> str:
return self.gopay.base_url[-4] + "/gp-gw/js/embed.js"
return self.gopay.base_url[:-4] + "/gp-gw/js/embed.js"
3 changes: 3 additions & 0 deletions tests/test_payments.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,3 +81,6 @@ def test_with_services(
assert payments.gopay.api_client.token is not None
assert isinstance(payments.gopay.api_client.cache, MockCache)
assert payments.gopay.api_client.logger == mock_logger

def test_embed_url(self, payments: Payments, gateway_url: str):
assert payments.get_embedjs_url == gateway_url[:-4] + "/gp-gw/js/embed.js"

0 comments on commit a5d9e2f

Please sign in to comment.