Skip to content

Commit

Permalink
chore: new payment entity info
Browse files Browse the repository at this point in the history
  • Loading branch information
joamag committed Jan 3, 2025
1 parent ef2d7c0 commit 26306a5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ Code coverage of at least 75% of the code base should be considered a priority.
| Name | Type | Description |
| -------------------------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **BUDY_PAYMENT_PROVIDERS** | `list` | The list of payment providers that are going to be loaded in the Budy instance (defaults to `["stripe", "easypay_v2", "paypal", "stripe_sca"]`). |
| **BUDY_PAYMENT_ENTITY** | `str` | The name of the entity (as a description) that is going to be show to the customer, this is used for payments as MBWay (defaults to `None`). |
| **BUDY_STRIPE_LEGACY** | `bool` | If the legacy mode (old Stripe API no credit card sources) should be used (defaults to `False`). |
| **BUDY_3D_SECURE** | `bool` | If the [3-D Secure](https://en.wikipedia.org/wiki/3-D_Secure) mode should be enabled for cards that require or support that mode of execution, note that "normal" card execution mode will be applied for cards that do not support this method (defaults to `False`). |
| **BUDY_3D_ENSURE** | `bool` | If the [3-D Secure](https://en.wikipedia.org/wiki/3-D_Secure) mode is enabled, forces all the credit card operations to be performed using the 3-D Secure approach (defaults to `False`). |
Expand Down
10 changes: 9 additions & 1 deletion src/budy/models/order.py
Original file line number Diff line number Diff line change
Expand Up @@ -1818,12 +1818,20 @@ def _pay_easypay_v2(self, payment_data, warning_d=None, cancel_d=None):
cancel_d = appier.conf("BUDY_MB_CANCEL", cast=float, default=259200)
else:
cancel_d = 300
payment_entity = appier.conf("BUDY_PAYMENT_ENTITY", None)
payment_description = (
"%s - %s" % (payment_entity, self.reference)
if payment_entity
else self.reference
)
payment = api.generate_payment(
self.payable,
method=method,
key=self.key,
type="sale" if type == "mbway" else None,
capture=dict(descriptive=self.reference, transaction_key=self.reference),
capture=dict(
descriptive=payment_description, transaction_key=payment_description
),
customer=(
dict(
name=self.shipping_address.full_name,
Expand Down

0 comments on commit 26306a5

Please sign in to comment.