Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update docs.md #519

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Update docs.md
Update 'docmentation' to 'documentation'
  • Loading branch information
1mdarwin authored Apr 10, 2023
commit 99b816f95ccd9e9f1f58f8434532acd0ea0fd2a0
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@ taxonomy:

After a customer provides his payment details to the payment provider for your off-site gateway, the payment provider redirects the customer back to your site. If the customer declines to provide his payment details and cancels the payment at the payment provider, he will be redirected back to the cancel url. Otherwise, he will be redirected back to the return url so that you can validate that the payment actually succeeded and create the Drupal Commerce payment for the customer's order.

Off-site payment gateways implement the `OffsitePaymentGatewayInterface`, which defines the methods used to handle the return from the payment provider: `onCancel()`, and `onReturn()`. This documentation page describes how to implement these methods, which is just one aspect of creating an off-site payment gateway. See the [Off-site payment gateways docmentation](../docs.md) for a full overview.
Off-site payment gateways implement the `OffsitePaymentGatewayInterface`, which defines the methods used to handle the return from the payment provider: `onCancel()`, and `onReturn()`. This documentation page describes how to implement these methods, which is just one aspect of creating an off-site payment gateway. See the [Off-site payment gateways documentation](../docs.md) for a full overview.

Note that if your payment provider supports asynchronous notifications (IPNs), then creating the payment in `onNotify()` is preferred, since it is guaranteed to be called even if the customer does not return to the site. Also, some off-site payment gateways do not need to implement the `onReturn()` method at all. Instead, they just handle payment creation and processing in the `onNotify()` method. See the [Handling an IPN documentation](../04.handling-ipn) for more information.