com.ibm.commerce.rest.order.handler

Class PaymentInstructionHandler

    • Field Detail

      • COPYRIGHT

        public static final java.lang.String COPYRIGHT
        IBM Copyright notice field.
        See Also:
        Constant Field Values
      • RESOURCE_NAME

        public static final java.lang.String RESOURCE_NAME
        The Constant RESOURCE_NAME.
        See Also:
        Constant Field Values
      • RESOURCE_MAPPING_KEY

        public static final java.lang.String RESOURCE_MAPPING_KEY
        The Constant RESOURCE_MAPPING_KEY.
        See Also:
        Constant Field Values
      • FORMAT_GROUP_NAME

        public static final java.lang.String FORMAT_GROUP_NAME
        The constant FORMAT_GROUP_NAME
        See Also:
        Constant Field Values
      • PARAMETER_ORDER_ID

        public static final java.lang.String PARAMETER_ORDER_ID
        order identifier
        See Also:
        Constant Field Values
      • PARAMETER_ORDER_ID_DESCRIPTION

        public static final java.lang.String PARAMETER_ORDER_ID_DESCRIPTION
        order identifier description
        See Also:
        Constant Field Values
      • PARAMETER_PI_ID

        public static final java.lang.String PARAMETER_PI_ID
        payment instruction identifier
        See Also:
        Constant Field Values
      • PARAMETER_PI_ID_DESCRIPTION

        public static final java.lang.String PARAMETER_PI_ID_DESCRIPTION
        payment instruction description
        See Also:
        Constant Field Values
      • FIND_PUNCHOUT_PAYMENTINFO_BY_ORDERID_AND_PIID

        public static final java.lang.String FIND_PUNCHOUT_PAYMENTINFO_BY_ORDERID_AND_PIID
        The XPATH for finding punch out payment instruction by orderId and piId
        See Also:
        Constant Field Values
    • Constructor Detail

      • PaymentInstructionHandler

        public PaymentInstructionHandler()
    • Method Detail

      • getResourceName

        public java.lang.String getResourceName()
        Description copied from interface: IResourceHandler
        This method returns the name of the resource used primarily to determine the representation of the resource. This class can be overridden to change the name of the resource and therefore the representation, while keeping all the methods in this class.
        Returns:
        the resource name
      • getHelper

        public OrderHelper getHelper()
        This method returns the Payment instruction helper used to payment instructions (PI) contents
        Returns:
        PaymentInstructionHelper
      • getPaymentInfo

        @GET
        public javax.ws.rs.core.Response getPaymentInfo(@PathParam(value="storeId")
                                                             java.lang.String storeId,
                                                             @QueryParam(value="responseFormat")
                                                             java.lang.String responseFormat)
        Get payment instruction for the shopping cart.
        Parameters:
        storeId - the store id
        responseFormat - the response format
        Returns:
        the payment info
      • getPunchoutPaymentInfo

        @GET
         @Path(value="punchoutPaymentInfo")
        public javax.ws.rs.core.Response getPunchoutPaymentInfo(@PathParam(value="storeId")
                                                                                                         java.lang.String storeId,
                                                                                                         @QueryParam(value="orderId")
                                                                                                         java.lang.String orderId,
                                                                                                         @QueryParam(value="piId")
                                                                                                         java.lang.String piId,
                                                                                                         @QueryParam(value="responseFormat")
                                                                                                         java.lang.String responseFormat)
        Get payment instruction for the punch out payment.
        Parameters:
        storeId - the store id
        orderId - the order id
        piId - the payment instruction id
        responseFormat - the response format
        Returns:
        the payment info
      • addPaymentInstruction

        @POST
         @Consumes(value={"application/json","application/xml"})
        public javax.ws.rs.core.Response addPaymentInstruction(@PathParam(value="storeId")
                                                                                                                              java.lang.String storeId,
                                                                                                                              @QueryParam(value="responseFormat")
                                                                                                                              java.lang.String responseFormat)
        This method adds payment instruction to the shopping cart. If "valueFromProfileOrder=Y" is found in request parameters, then the payment data will be taken from the quick checkout profile.
        Parameters:
        storeId - the store Id.
        responseFormat - the response format (xml, json, or atom).
        Returns:
        A map of String [] that contains the following response parameters: resourceId, resourceType, PI ( payment instruction)
      • updatePaymentInstruction

        @PUT
         @Consumes(value={"application/json","application/xml"})
        public javax.ws.rs.core.Response updatePaymentInstruction(@PathParam(value="storeId")
                                                                                                                                java.lang.String storeId,
                                                                                                                                @QueryParam(value="responseFormat")
                                                                                                                                java.lang.String responseFormat)
        This method updates an existing payment instruction in the shopping cart.
        Parameters:
        storeId - the store Id.
        responseFormat - the response format (xml, json, or atom).
        Returns:
        A map of String [] that contains the following response parameters: resourceId, resourceType, PI ( payment instruction)
      • deletePaymentInstruction

        @DELETE
         @Path(value="{paymentInstruction_id}")
        public javax.ws.rs.core.Response deletePaymentInstruction(@PathParam(value="storeId")
                                                                                                                  java.lang.String storeId,
                                                                                                                  @PathParam(value="paymentInstruction_id")
                                                                                                                  java.lang.String paymentInstruction_id,
                                                                                                                  @QueryParam(value="responseFormat")
                                                                                                                  java.lang.String responseFormat)
        Delete a payment Instruction from the shopping cart.
        Parameters:
        storeId - the store Id.
        paymentInstruction_id - the payment instruction_id
        responseFormat - the response format (xml, json, or atom).
        Returns:
        A map of String [] that contains the following response parameters: resourceId, resourceType
      • deleteAllPaymentInstructions

        @DELETE
        public javax.ws.rs.core.Response deleteAllPaymentInstructions(@PathParam(value="storeId")
                                                                              java.lang.String storeId,
                                                                              @QueryParam(value="responseFormat")
                                                                              java.lang.String responseFormat)
        This method deletes all payment Instructions from the shopping cart.
        Parameters:
        storeId - the store Id.
        responseFormat - the response format (xml, json, or atom).
        Returns:
        Response the Response
      • getSensitiveDataMaskByPlainString

        @GET
         @Path(value="sensitive_data_mask_by_plain_string")
        public javax.ws.rs.core.Response getSensitiveDataMaskByPlainString(@PathParam(value="storeId")
                                                                                                                                    java.lang.String storeId,
                                                                                                                                    @QueryParam(value="responseFormat")
                                                                                                                                    java.lang.String responseFormat,
                                                                                                                                    @QueryParam(value="profileName")
                                                                                                                                    java.lang.String profileName)
                                                                                                                             throws com.ibm.commerce.foundation.rest.resourcehandler.RestException
        Gets sensitive data mask information for plain string.
        Parameters:
        storeId - the store id
        plainString - the plain string
        responseFormat - the format of the response
        profileName - the profile name
        Returns:
        the sensitive data mask information
        Throws:
        com.ibm.commerce.foundation.rest.resourcehandler.RestException
      • addDataToRequestMapIfNeeded

        public void addDataToRequestMapIfNeeded(BusinessContextType bContext,
                                                javax.security.auth.callback.CallbackHandler cbh,
                                                java.util.Map<java.lang.String,java.lang.Object> requestMap)
                                         throws PersonException,
                                                OrderException
        Add orderId and billing_address_id to the request map if they are not present.
        Parameters:
        bContext - business context
        cbh - callback handler
        requestMap - request map
        Throws:
        PersonException - PersonException
        OrderException - OrderException
      • repay

        @POST
         @Path(value="repay")
         @Produces(value={"application/json","application/xml","application/xhtml+xml","application/atom+xml"})
        public javax.ws.rs.core.Response repay(@PathParam(value="storeId")
                                                                                                                                                                                   java.lang.String storeId,
                                                                                                                                                                                   @QueryParam(value="orderId")
                                                                                                                                                                                   java.lang.String orderId,
                                                                                                                                                                                   @QueryParam(value="piId")
                                                                                                                                                                                   java.lang.String piId,
                                                                                                                                                                                   @QueryParam(value="responseFormat")
                                                                                                                                                                                   java.lang.String responseFormat)
        This method processes the Punch-out payment request.
        Parameters:
        storeId - the store Id.
        orderId - the order Id.
        piId - the payment instruction id.
        responseFormat - the response format (xml, json, or atom).
        Returns:
        A map of String [] that contains the following response parameters: orderId
      • punchoutPaymentCallBack

        @POST
         @Path(value="callback")
         @Produces(value={"application/json","application/xml","application/xhtml+xml","application/atom+xml"})
        public javax.ws.rs.core.Response punchoutPaymentCallBack(@PathParam(value="storeId")
                                                                                                                                                                                                        java.lang.String storeId,
                                                                                                                                                                                                        @QueryParam(value="responseFormat")
                                                                                                                                                                                                        java.lang.String responseFormat)
        Processes the punch-out call back requests.
        Parameters:
        storeId - the store id
        searchTerm - the search term
        responseFormat - the response format
        Returns:
        the response containing the landing page view name
      • fetchPaymentToken

        @GET
         @Produces(value={"application/json","application/xml","application/xhtml+xml","application/atom+xml"})
         @Path(value="payment_token")
        public javax.ws.rs.core.Response fetchPaymentToken(@PathParam(value="storeId")
                                                                                                                                                                                                      java.lang.String storeId,
                                                                                                                                                                                                      @QueryParam(value="payment_token")
                                                                                                                                                                                                      java.lang.String payment_token,
                                                                                                                                                                                                      @QueryParam(value="payment_method")
                                                                                                                                                                                                      java.lang.String payment_method,
                                                                                                                                                                                                      @QueryParam(value="responseFormat")
                                                                                                                                                                                                      java.lang.String responseFormat)
                                                                                                                                                                                               throws java.lang.Exception
        Fetch Payment Token.
        Parameters:
        storeId -
        responseFormat -
        Returns:
        Throws:
        java.lang.Exception