SAP Hybris suite , Hybris tutorial, Java, J2ee Stuff Online-

0
Payment Extension : Point should remember during hybris interview

Open 2 Answers 961 Views

Below Point should remember during hybris interview

1. Payment extension provide payment framework in hybris

2. Payment extension support payment gateway adapter to communicate with payment provider.

3. Payment extension basically provide interface to create payment gateway like Cybersource payment gateway adapter

4. During payment all information means data require for payment operation is stateless and only transcational data is persisted in database

Payment extension store only it does not store any data that used in payment cards

a. Payment transaction data

b. Payment history data

2 Answers

0

The payment services are stateless. The only information which is saved in the database is the transaction and the payment steps.

Each abstract order (cart or order) may have a Transaction which has at least a TransactionEntry.

A transaction entry represents a step in the payment.

Payment Services are used to request authorization, capture or cancellation of the payment with a card. It defines methods for each of the operations available for debit and credit cards. They return a TransactionEntryModel which must be added to the transaction of the abstract order.

Payment Mode Services implemented the low-level calls which are required for each mode. There is a default implementation for CardPaymentService.

Each PSP adapter must implement the payment command interfaces and a command factory.

Each provider has a command factory which creates the commands supported by him. This factory is configured in the spring app contex

answered Jul 22, 2016 by ermanoj (1,240 points)
0

For Paypal You need create your Command Factory

 

<!-- PayPal payment commands -->
    <bean name="paypalCommandFactory" class="de.hybris.platform.payment.commands.factory.impl.DefaultCommandFactoryImpl">
        <property name="paymentProvider" value="PayPal"/>
        <property name="commands">
           <map>
               <entry>
                   <key>
                       <value type="java.lang.Class">de.hybris.platform.payment.commands.IsApplicableCommand</value>
                   </key>
                   <bean class="com.paypal.hybris.commands.impl.IsApplicableCommandImpl" />
               </entry>
               <entry>
                   <key>
                       <value type="java.lang.Class">de.hybris.platform.payment.commands.AuthorizationCommand</value>
                   </key>
                   <bean class="com.paypal.hybris.commands.impl.AuthorizationCommandImpl"/>
               </entry>
               <entry>
                   <key>
                       <value type="java.lang.Class">de.hybris.platform.payment.commands.CaptureCommand</value>
                   </key>
                   <bean class="com.paypal.hybris.commands.impl.CaptureCommandImpl">
                       <property name="paypalPaymentService" ref="paypalPaymentService"/>
                       <property name="captureRequestConverter" ref="captureRequestToDoCaptureReqConverter"/>
                       <property name="doCaptureResponseConverter" ref="doCaptureResponseConverter"/>
                       <property name="captureStrategy" ref="captureStrategy"/>
                       <property name="configurationService" ref="configurationService"/>
                   </bean>
               </entry>
               <entry>
                   <key>
                       <value type="java.lang.Class">de.hybris.platform.payment.commands.PartialCaptureCommand</value>
                   </key>
                   <bean class="com.paypal.hybris.commands.impl.PartialCaptureCommandImpl"/>
               </entry>
               <entry>
                   <key>
                       <value type="java.lang.Class">de.hybris.platform.payment.commands.VoidCommand</value>
                   </key>
                   <bean class="com.paypal.hybris.commands.impl.VoidCommandImpl">
                       <property name="paypalPaymentService" ref="paypalPaymentService"/>
                       <property name="voidRequestConverter" ref="voidRequestConverter"/>
                       <property name="doVoidResponseConverter" ref="doVoidResponseConverter"/>
                   </bean>
               </entry>
               <entry>
                   <key>
                       <value type="java.lang.Class">de.hybris.platform.payment.commands.FollowOnRefundCommand</value>
                   </key>
                   <bean class="com.paypal.hybris.commands.impl.FollowOnRefundCommandImpl"/>
               </entry>
                               <entry>
                   <key>
               <value type="java.lang.Class">de.hybris.platform.payment.commands.StandaloneRefundCommand</value>
                   </key>
                   <bean class="com.paypal.hybris.commands.impl.StandaloneRefundCommandImpl"/>
               </entry>
           </map>
       </property>
    </bean>
answered Jul 24, 2016 by anonymous

...