Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Fix typos in docs

Pacu26ad9900e1869
diff --git a/docs/architecture/payments.rst b/docs/architecture/payments.rst
index 94a7effa17..e9e24f937d 100644
--- a/docs/architecture/payments.rst
+++ b/docs/architecture/payments.rst
@@ -4,10 +4,11 @@ Payments
Supported Gateways
------------------
-The default configuration uses the *dummy* backend.
+The default configuration uses the `dummy` backend.
It's meant to allow developers to easily simulate different payment results.
-Here is a list of supported payment providers:
+Supported payment providers:
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^
* Braintree
@@ -28,9 +29,10 @@ Authorization and capture is a two-step process.
Firstly the funds are locked on the payer's account but are not transferred to your bank.
-Then depending on the provider and card type you have between a few days and a month to charge the card for an amount not exceeding the authorized amount.
+Then depending on the provider and the card type, you have between a few days and a month to charge the card for an amount not exceeding the authorized amount.
-This is very useful when an exact price cannot be determined until after the order is prepared.
+This is very useful when an exact price cannot be determined until after the order is prepared,
+or we want to capture the money as soon as we ship the order.
It is also useful if your business prefers to manually screen orders for fraud attempts.
When viewing orders with pre-authorized payments Saleor will offer options to either capture or release the funds.
@@ -40,7 +42,7 @@ Refunds
-------
You can issue partial or full refunds for all captured payments.
-When you edit an order and remove items Saleor will also offer to automatically issue a partial refund.
+When editing an order and removing items, Saleor will also offer to automatically issue a partial refund.
Saleor uses the concept of Payments and Transactions to fulfill the payment process.
diff --git a/docs/guides/payments.rst b/docs/guides/payments.rst
index 108355833a..05b9a3e869 100644
--- a/docs/guides/payments.rst
+++ b/docs/guides/payments.rst
@@ -3,19 +3,19 @@
Payments
========
-Integrating new Payment Gateway into Saleor
+Integrating a new Payment Gateway into Saleor
-------------------------------------------
We are using a universal flow, that each provider should fulfill, there are
several methods that should be implemented.
Your changes should live under the
-``saleor.payment.providers.<provider name>``.
+``saleor.payment.providers.<provider name>`` module.
.. note::
- After completing those changes your new payment gateway will be available
- only from the API level. You also need to integrate it into your
+ After completing those steps your new payment gateway will only be
+ available from the API level. You will also need to integrate it into your
Frontend's workflow.
get_transaction_token(**connection_params)
diff --git a/saleor/graphql/order/mutations/orders.py b/saleor/graphql/order/mutations/orders.py
index 405c954488..8a169d9b27 100644
--- a/saleor/graphql/order/mutations/orders.py
+++ b/saleor/graphql/order/mutations/orders.py
@@ -268,6 +268,7 @@ class OrderCancel(BaseMutation):
else:
order.events.create(
type=OrderEvents.CANCELED.value, user=info.context.user)
+ # FIXME all payments should be voided/refunded at this point
return OrderCancel(order=order)
@@ -325,6 +326,7 @@ class OrderCapture(BaseMutation):
return OrderCapture(errors=errors)
order = cls.get_node_or_error(info, id, errors, 'id', Order)
+ # FIXME adjust to multiple payments in the future
payment = order.get_last_payment()
clean_order_capture(payment, amount, errors)
try_payment_action(payment.capture, amount, errors)
diff --git a/saleor/payment/providers/braintree/__init__.py b/saleor/payment/providers/braintree/__init__.py
index f637697004..931bbbca47 100644
--- a/saleor/payment/providers/braintree/__init__.py
+++ b/saleor/payment/providers/braintree/__init__.py
@@ -92,7 +92,8 @@ def extract_gateway_response(braintree_result) -> Dict:
if bt_transaction.currency_iso_code != settings.DEFAULT_CURRENCY:
logger.error(
'Braintree\'s currency is different than shop\'s currency')
-
+ # FIXME we should have a predefined list of fields that will be supported
+ # in the API
gateway_response = {
'currency_iso_code': bt_transaction.currency_iso_code,
'amount': bt_transaction.amount,