Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] authored and PetrDlouhy committed Dec 9, 2022
1 parent 7a91078 commit d3bce38
Showing 1 changed file with 19 additions and 13 deletions.
32 changes: 19 additions & 13 deletions payments/paypal/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -316,20 +316,26 @@ def create_subscription(self, payment, extra_data=None):
plan_data = {
"plan_id": plan_id,
"plan": { # Override plan values
"billing_cycles": [{
"sequence": 1,
# TODO: This doesn't work:
# "frequency": {
# "interval_unit": payment.get_subscription().get_unit(),
# "interval_count": payment.get_subscription().get_period(),
# },
"pricing_scheme": {
"fixed_price": {
"currency_code": payment.currency,
"value": str(payment.total.quantize(CENTS, rounding=ROUND_HALF_UP)),
"billing_cycles": [
{
"sequence": 1,
# TODO: This doesn't work:
# "frequency": {
# "interval_unit": payment.get_subscription().get_unit(),
# "interval_count": payment.get_subscription().get_period(),
# },
"pricing_scheme": {
"fixed_price": {
"currency_code": payment.currency,
"value": str(
payment.total.quantize(
CENTS, rounding=ROUND_HALF_UP
)
),
},
},
},
}],
}
],
},
"application_context": {
"shipping_preference": "NO_SHIPPING",
Expand Down

0 comments on commit d3bce38

Please sign in to comment.