Ansicht
Dokumentation

ERP_COM_WEC_PSP_INT - BAdI: Integration of Payment Service Providers

ERP_COM_WEC_PSP_INT - BAdI: Integration of Payment Service Providers

ABAP Short Reference   BAL_S_LOG - Application Log: Log header data  
This documentation is copyright by SAP AG.
SAP E-Book

This Business Add-In (BAdI) is used in the Web Channel: Basic Functions - Payment Method (WEC-APP-BF-PAY) component. You can use this BAdI to integrate SAP Web Channel Experience Management with payment service providers.

The BAdI offers methods that support the following scenarios:

  • When a customer creates an order (a reference document) in the Web shop and pays using a payment service provider, the SAP system creates a payment transaction in the system of the payment service provider.
  • The SAP system checks for and retrieves the current status of a payment transaction in the system of the payment service provider.
  • When a reference document in an SAP system is rejected, the system refunds the associated payment transaction in the payment service provider system.

The following types of reference documents in the SAP system are supported:

  • SAP CRM sales order (corresponds to an Order in the Web shop)
  • SAP CRM service order (corresponds to a Service Request in the Web shop)
  • SAP ERP sales order (corresponds to an Order in the Web shop)
  1. In the Customizing activity Define Payment Service Providers, you have defined the superset of payment service providers in the system that you can choose from to activate for your Web shops. The BAdI uses the ID of a payment service provider as a filter. Therefore, there can be only one implementation for each payment service provider defined in the system.
  2. In the Customizing activity Activate Payment Service Providers (Client-Specific), you have activated the set of payment service providers (for each client) that your Web shop customers can use for payment.
  3. In the Customizing activity Define Payment Transaction Status Profiles and Statuses, you have defined payment transaction status profiles. For each profile, you have defined the payment transaction statuses. The payment transaction statuses are persisted as part of the reference document in the SAP CRM system.
  4. In the Customizing activity Define Profile and Status for Payment Transaction, you have defined payment transaction status profiles. For each profile, you have defined the payment transaction statuses. The payment transaction statuses are persisted as part of the reference document in the SAP ERP system. When defining these payment transaction statuses, you can choose the following system checks (indicators):
  • Fulfillment allowed

  • Invoice allowed

  • Refund message for payment transaction status

  1. You have created an implementation of enhancement spot COM_WEC_PAYMENT.

For more information about the standard settings (filters, single or multiple uses), see the Enh. Spot Element Definitions tab in the BAdI Builder (transaction SE18).

Implementing for Each Payment Service Provider

You create one implementation for BAdI COM_WEC_PSP_INTEGRATION for each payment service provider and assign the payment service provider identification (defined in Customizing) as a filter value. For each implementation of the BAdI, you can use these BAdI methods as follows:

  • GET_TRANSACTION_DETAILS: Check for the existence of and retrieve the current status of a payment transaction in the system of the payment service provider
  • CANCEL_TRANSACTION: Refund payment transactions when a reference document in the SAP system is rejected

Linking Reference Documents and Payment Transactions

Payment transactions in the payment service provider system must be logically linked to the corresponding reference documents in the SAP system using one of the following identifiers:

Note: The system transfers the REFERENCE_ID field and the REFERENCE_GUID field from the reference document through billing (SAP CRM) or SD billing (SAP ERP) to SAP ERP Financials. When you import settlement files provided by the payment service provider into SAP ERP Financials, the REFERENCE_ID field and the REFERENCE_GUID field can be used to identify and clear the open items created by billing. For more information on importing settlement files into SAP ERP Financials, see Customizing for Sales and Distribution under SAP Web Channel Experience Management -> Payment Service Providers -> Business Add-Ins (BAdIs) -> BAdI: Import Settlement File (for Each Payment Service Provider).

For information about the implementation of BAdIs in the context of the Enhancement Concept, see SAP Library for SAP NetWeaver under BAdIs - Embedding in the Enhancement Framework.

Creating a Payment Transaction in the Payment Service Provider System

  1. The Web shop customer pays for an order (a reference document) created in the Web shop using a payment service provider.
  2. The INITIATE_TRANSACTION BAdI method is called and the BAdI method implementation triggers a redirect of the customer from the Web shop to the Web site of the payment service provider. The Web shop customer logs on to the payment service provider system (or creates a new account), reviews the payment transaction details, and either confirms or rejects the payment transaction.
  3. The payment service provider redirects the customer back to the Web shop and the PROCESS_CALLBACK BAdI method is called. If the Web shop customer has confirmed the payment transaction in the previous step, the BAdI method implementation triggers a confirmation page to be shown. If the customer rejected the payment transaction, the BAdI method implementation triggers a redirect of the customer back to the checkout process. The customer can complete the checkout again. Note that the customer can select a different payment service provider or even a different payment method (for example, invoice)

BAdI method documentation:

For more information about using payment service providers, see SAP Library for SAP Web Channel Experience Management on SAP Help Portal at http://help.sap.com/wec -> Application Help -> SAP Web Channel Experience Management -> E-Commerce and E-Marketing -> Checkout -> Payment Methods -> Integration of Payment Service Providers.






BAL_S_LOG - Application Log: Log header data   RFUMSV00 - Advance Return for Tax on Sales/Purchases  
This documentation is copyright by SAP AG.

Length: 9492 Date: 20240523 Time: 215107     sap01-206 ( 245 ms )