paytechuz / payme-pkg Goto Github PK
View Code? Open in Web Editor NEW🟢 Merchant Api and Subscribe Api Integration 2023—08
Home Page: https://docs.pay-tech.uz/payme-pkg/
License: MIT License
🟢 Merchant Api and Subscribe Api Integration 2023—08
Home Page: https://docs.pay-tech.uz/payme-pkg/
License: MIT License
Барибир тайёр workflow ишлатишга тогри келди, месседжни чиройли принт килиш ун коммитни title, desc, author + event typeни олишда yml да кийин буляпти
https://github.com/marketplace/actions/telegram-notification-gate
Removed (#20)
Here in these lines, it's incorrectly implemented pass check in CUSTOM_ORDER
variable,
even when I include my custom model, it ignores it.
Lines 30 to 39 in 92647c0
Always scolding me with it's warn message:
You have no payme custom order model
When I print a CUSTOM_ORDER.__doc__
, docstring is printed, but not everyone writes the word "amount"
there, hardly everyone writes docstring under classes!
@staticmethod
def to_soum(amount: Decimal) -> Decimal:
"""
Convert from tiyin to soum.
Parameters
----------
amount: Decimal -> order amount
"""
return amount * 100
@staticmethod
def to_tiyin(amount: Decimal) -> Decimal:
"""
Convert from tiyin to soum.
Parameters
----------
amount: Decimal -> order amount
"""
return amount / 100
@staticmethod
def to_tiyin(amount: Decimal) -> Decimal:
"""
Convert from soum to tiyin.
Parameters
----------
amount: Decimal -> order amount
"""
return amount * 100
@staticmethod
def to_soum(amount: Decimal) -> Decimal:
"""
Convert from tiyin to soum.
Parameters
----------
amount: Decimal -> order amount
"""
return amount / 100
The generate_link()
method within the GeneratePayLink
data class in our project currently lacks flexibility by not allowing a custom callback_url
. This enhancement aims to incorporate a callback_url
parameter, enabling users to specify their desired callback URL when generating payment links.
Order
model used IntegerField
for amountFloatField
is used for amount in TransactionModel
Decimal
in GeneratePayLink
int
in other placesAll should be converted to float
or decimal
A package failing to build. Scroll up in the output to see if "Building wheel" failed for the same package. If yes, then you want to investigate that issue and not this warning.
Or, wheel
not being installed in your environment.
If you're a user, install that package in the environment to avoid hitting this issue.
If you're the package author, make sure you can install the package with --use-pep517
passed into pip.
File "/Users/darklaki/PycharmProjects/naktutka_web/.venv/lib/python3.12/site-packages/django/views/generic/base.py", line 104, in view
return self.dispatch(request, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/darklaki/PycharmProjects/naktutka_web/.venv/lib/python3.12/site-packages/rest_framework/views.py", line 509, in dispatch
response = self.handle_exception(exc)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/darklaki/PycharmProjects/naktutka_web/.venv/lib/python3.12/site-packages/rest_framework/views.py", line 469, in handle_exception
self.raise_uncaught_exception(exc)
File "/Users/darklaki/PycharmProjects/naktutka_web/.venv/lib/python3.12/site-packages/rest_framework/views.py", line 480, in raise_uncaught_exception
raise exc
File "/Users/darklaki/PycharmProjects/naktutka_web/.venv/lib/python3.12/site-packages/rest_framework/views.py", line 506, in dispatch
response = handler(request, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/darklaki/PycharmProjects/naktutka_web/.venv/lib/python3.12/site-packages/payme/views.py", line 61, in post
order_id, action = paycom_method(incoming_data.get("params"))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/darklaki/PycharmProjects/naktutka_web/.venv/lib/python3.12/site-packages/payme/methods/create_transaction.py", line 23, in __call__
data=get_params(params)
^^^^^^^^^^^^^^^^^^
File "/Users/darklaki/PycharmProjects/naktutka_web/.venv/lib/python3.12/site-packages/payme/utils/get_params.py", line 22, in get_params
clean_params["order_id"] = account[account_name]
~~~~~~~^^^^^^^^^^^^^^
KeyError: 'order_id'
[07/Feb/2024 11:18:27] "POST /api/payment/payme/transaction/ HTTP/1.1" 500 107475
Something like this:
def to_qrcode(data) -> base64 (str) | Path:
...
py manage.py test
commandIt is enough to leave a link to the docs site :: https://docs.pay-tech.uz
payme-pkg/lib/payme/serializers.py
Line 50 in 880034c
TypeError: '<=' not supported between instances of 'int' and 'str'
Add a detail object to Order model
Detail key | Type | Summary | Required |
---|---|---|---|
receipt_type |
Number | Sale/Refund = 0 | ✅ |
shipping |
Object | Delivery | ❌ |
items |
Array | Commodity item | ✅ |
{
"result": {
"allow": true,
"detail": {
"receipt_type" : 0,
"shipping": {},
"items": []
}
}
}
Items array parameters:
Name | Type | Description | Required |
---|---|---|---|
discount |
Number | Discount based on quantity of products or services (tiyins) | ❌ |
title |
String | Product or service name | ✅ |
price |
Number | Price per unit of products or services (tiyins) | ✅ |
count |
Number | Quantity of products or services | ✅ |
code |
String | ICPS (Identification code of product or service) | ✅ |
units |
Number | Measurement unit code | ❌ |
package_code |
String | Product packaging code | ✅ |
vat_percent |
Number | Percentage of VAT payable for this product | ✅ |
Shipping object parameters (optional field):
Name | Type | Description | Required |
---|---|---|---|
title |
String | Maybe delivery location | ✅ |
price |
Number | Cost of delivery | ✅ |
With only required objects and their keys, we need to add like following for each product or service in our Order model:
"detail": {
"receipt_type": 0,
"items": [
{
"title": "<product-or-service-name>",
"price": "<price>",
"count": "<quantity-int>",
"code": "<ICPS>",
"package_code": "<package-code>"
"vat_percent": "<percent-int>",
}
]
}
just test
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.