OroCommerce Apruve Integration
- dev-master / 5.0.x-dev
This package is auto-updated.
Last update: 2021-09-01 11:23:29 UTC
The bundle allows admin users to enable and configure the Apruve payment method available on the checkout process and therefore empower customers to pay for orders by credit obligations attested by Apruve.
- Integration type:
- Payment method:
- see namespace
Oro\Bundle\ApruveBundle\Method\PaymentActionfor concrete payment method actions implementations
- Apruve-specific models and builders for them:
- see namespaces
- Apruve rest client:
Oro\Bundle\ApruveBundle\Client\ApruveRestClient- works with
RestClientFactoryInterfaceunder the hood
Oro\Bundle\ApruveBundle\Client\Request\ApruveRequest- request DTO
- Apruve webhooks:
Oro\Bundle\ApruveBundle\Controller\WebhookController- entry point of webhooks processing.
Oro\Bundle\ApruveBundle\EventListener\Callback\PaymentCallbackListener- handles "return" payment event, which is triggered when user authorizes a payment. Delegates further processing to
PaymentTransaction 1 is created in
Oro\Bundle\ApruveBundle\Method\PaymentAction\PurchasePaymentActionwhen a customer clicks Submit at the last step of checkout process.
If a customer authorizes payment in Apruve lightbox, PaymentTransaction 1 is updated with Apruve Order Id and is marked as successful in
Oro\Bundle\ApruveBundle\Method\PaymentAction\AuthorizePaymentAction. Otherwise, nothing is changed.
Once a payment is authorized, it can be invoiced using "Send Invoice" button in admin area on Order view page in the "Payment History" section. When you click "Send Invoice", PaymentTransaction 2 is getting created along with Apruve Invoice in
Oro\Bundle\ApruveBundle\Method\PaymentAction\InvoicePaymentAction. As soon as Apruve Invoice is created successfully, PaymentTransaction 3 is getting created along with Apruve Shipment entity in
When a customer fulfils invoice, Apruve notifies about it via webhook
invoice.closedwhich is getting processed starting from in
Oro\Bundle\ApruveBundle\Controller\WebhookController. In case of success, PaymentTransaction 4 is created and marked as successful. If a customer does not pay for Apruve Invoice in time, it is marked as overdue and silently canceled on Apruve side.
Apruve does not properly respect
price_total_centsproperty of Apruve LineItem - it is not taken into account when secure hash is being generated from Apruve Order on Apruve side, though Apruve takes
amount_cents(see Merchant Integration Tutorial). That's why it was decided (and approved by Apruve Support) to use
amount_centsproperty in Apruve LineItem entity. See
Oro\Bundle\ApruveBundle\Apruve\Generator\OrderSecureHashGeneratorfor details. On the other hand,
price_total_centsis required for the line items which reside in Apruve Invoice, that is why both of these properties are present in Apruve LineItem entity.
Apruve wants to be notified about shipments from merchants who sell physical goods, but does not need this for other merchant types. Due to this fact it will not fulfil invoices in cases when it was not notified of shipment (when Shipment entity is not created via API) for merchants of physical goods. In order to unify the behavior for all types of merchants, it was decided to always notify Apruve about shipment, no matter goods of what type are sold. Shipment entity is created in Apruve along with Invoice entity when "Send Invoice" button is clicked on Order view page in the "Payment History" section.
No, customers do not leave the commerce application during the checkout process. The user has to authorize payment in the Apruve popup (lightbox) at the last step of the checkout.
You have to ask Apruve Support (email@example.com) for test merchant and buyer account.
Corporate accounts differ. You should have a corporate account associated exactly with the merchant account you are trying to deal with.