13 Adding Custom Payment Types

Learn how to add the custom payment types that you configured in Oracle Communications Billing and Revenue Management (BRM) to Oracle Communications Billing Care.

Topics in this document:

About Custom Payment Types

Billing Care supports the following default payment types:

  • Credit Card

  • Debit Card

  • Cash

  • Check

  • Wire-Transfer

  • Interbank Payment Order

  • Postal Order

BRM supports the creation of custom payment types, such as cryptocurrency, required by your business. Use the SDK to customize Billing Care to support custom payment types configured in your BRM. Adding custom BRM payment types to Billing Care enables the payment type to be selected when creating new accounts, adding payment methods, or processing manual payments.

Creating Custom Payment Types in BRM

Create custom BRM payment types using the Developer Center. This section provides a high-level overview of the process, including a general overview of creating and updating the required objects and classes. For detailed information on using Developer Center to create custom payment types, see "Creating Custom Fields and Storable Classes" in BRM Developer's Guide.

To create a custom payment type in BRM:

  1. Create the custom payment type payment and reversal event subclasses. See "Creating Custom Payment Type Event Subclasses" for more information.

  2. Update the BRM /config/paymenttool object with the required custom payment fields. See "Updating the /config/paymenttool Object with Custom Payment Types" for more information.

  3. Update the BRM /config/payment object with the custom payment and reversal events. See "Updating the /config/payment Object with Custom Payment Type Event" for more information.

Creating Custom Payment Type Event Subclasses

To create the custom payment type event subclasses:

  1. Start Developer Center.

  2. Open the Class Browser.

  3. Select the /event/billing/payment, /event/billing/reversal, and /event/billing/refund classes sequentially.

  4. Create the following new subclasses in the above classes:

    • /event/billing/payment/external

    • /event/billing/reversal/external

    • /event/billing/refund/external

    • /event/billing/payment/external/payment_type

    • /event/billing/reversal/external/payment_type

    • /event/billing/refund/external/payment_type

    where payment_type is the name of your custom payment type.

  5. Commit the new subclasses.

To add the required fields to the new custom payment type subclasses:

  1. Select the /event/billing/payment/external/payment_type class.

  2. Add the required fields for the custom payment type to the payment subclass. For example, if you are creating a new check payment type, add the PIN_FLD_CHECK_ID field.

  3. Commit the subclass changes to the database.

  4. Select the /event/billing/reversal/external/payment_type class.

  5. Add the required fields for the custom payment type to the reversal subclass. For example, if you are creating a new check payment type, add the PIN_FLD_CHECK_ID field.

  6. Select the /event/billing/refund/external/payment_type class.

  7. Add the required fields for the custom payment type to the refund subclass. For example, if you are creating a new check payment type, add the PIN_FLD_CHECK_ID field.

  8. Commit the subclass changes to the database.

Updating the /config/paymenttool Object with Custom Payment Types

Billing Care uses the /config/paymenttool object configuration to determine each payment type's required fields. Update this object with the required fields for your custom payment type after creating the subclasses.

To update the /config/paymenttool object:

  1. In the Object Browser, select /config/paymenttool.

  2. Find the /config/paymenttool object with a FLD_NAME value of PaymentTool payment Types: Default.

  3. Copy the /config/paymenttool object into the Opcode Work Bench.

  4. Add the required custom payment type fields to the object. Example 13-1 shows a sample flist for a new payment type with ID 11000 named External Check. This payment type has a new field called PIN_FLD_CHECK_ID.

  5. Use WRITE_FLDS with flag=32 to update the object with the new fields for your custom payment type.

Example 13-1 Sample /config/paymenttool fields for External Check Payment Type

0 PIN_FLD_POID                      POID [0] 0.0.0.1 /config/paymenttool  8398   0
  0 PIN_FLD_PAY_TYPES                ARRAY [11000] allocated 2, used 2
  1     PIN_FLD_NAME                   STR [0] "External Check"
  1     PIN_FLD_PAYMENTTOOL_FIELDS   ARRAY [0] allocated 4, used 4
  2         PIN_FLD_BATCH_TYPE         INT [0] 0
  2         PIN_FLD_COLUMN_NAME        STR [0] "check_No"
  2         PIN_FLD_FIELD_NAME         STR [0] "PIN_FLD_CHECK_ID"
  2         PIN_FLD_PURPOSE            INT [0] 0
  1   PIN_FLD_PAYMENTTOOL_FIELDS ARRAY [1] allocated 4, used 4
  2   PIN_FLD_BATCH_TYPE         INT [0] 1
  2   PIN_FLD_COLUMN_NAME        STR [0] "check_No"
  2   PIN_FLD_FIELD_NAME         STR [0] "PIN_FLD_CHECK_ID"
  2   PIN_FLD_PURPOSE            INT [0] 1 

Updating the /config/payment Object with Custom Payment Type Event

BRM stores payment events in the /config/payment object. Update this object with the new payment, reversal, and refund events you created for custom payment type.

To update the /config/payment object:

  1. In the Object Browser, select /config/payment.

  2. Copy the /config/payment object into the Opcode Work Bench.

  3. Add the required custom payment events to the object. Example 13-2 shows a sample flist for a new /event/billing/payment/external/check and /event/billing/refund/external/check events.

  4. Use WRITE_FLDS with flag=32 to update the object with the new fields for your custom payment type.

  5. Stop and start your BRM services.

Example 13-2 Sample /config/paymenttool fields for External Check Payment Type

 0 PIN_FLD_POID                      POID [0] 0.0.0.1 /config/payment 200 0
  0 PIN_FLD_PAY_TYPES                ARRAY [11000] allocated 4, used 4
  1     PIN_FLD_PAYINFO_TYPE           STR [0] "/payinfo"
  1     PIN_FLD_PAYMENT_EVENT_TYPE     STR [0]
  "/event/billing/payment/external/check"
  1     PIN_FLD_REFUND_EVENT_TYPE      STR [0]
  "/event/billing/refund/external/check"
  1     PIN_FLD_OPCODES              ARRAY [0] allocated 4, used 4
  2         PIN_FLD_EVENT_TYPE         STR [0] ""
  2         PIN_FLD_FLAGS              INT [0] 0
  2         PIN_FLD_NAME               STR [0] "PCM_OP_INVALID"
  2         PIN_FLD_OPCODE             INT [0] 0
  1     PIN_FLD_OPCODES              ARRAY [1] allocated 4, used 4
  2         PIN_FLD_EVENT_TYPE         STR [0] ""
  2         PIN_FLD_FLAGS              INT [0] 0
  2         PIN_FLD_NAME               STR [0] "PCM_OP_INVALID"
  2         PIN_FLD_OPCODE             INT [0] 0
  1     PIN_FLD_OPCODES              ARRAY [2] allocated 4, used 4
  2         PIN_FLD_EVENT_TYPE         STR [0] ""
  2         PIN_FLD_FLAGS              INT [0] 0
  2         PIN_FLD_NAME               STR [0] "PCM_OP_INVALID"
  2         PIN_FLD_OPCODE             INT [0] 0 

Customizing Billing Care to Support Custom BRM Payment Types

The Billing Care SDK includes a sample custom payment type customization in the SDK_home/samples/CustomPaymentMethodType directory, where SDK_home is the directory where you installed the SDK. Use this sample to assist you in customizing Billing Care with custom payment types.

Generating XSD and JSON Files for Custom Payment Types

Customizing the Billing Care Actions menu requires creating a custom XML configuration file (CustomActionMenu.xml). This file contains the configuration for your custom menu structure.

To customize Billing Care invoice presentation:

  1. Copy the default ActionMenu.xml file from SDK_home/references to a custom file named CustomActionMenu.xml in your myproject/web/WEB-INF/custom/configurations directory, where myproject is your NetBeans IDE project containing your Billing Care customizations.

  2. Customize the Actions menu using the CustomActionMenu.xml file as described in the following sections.

  3. Save and close the CustomActionMenu.xml file.

  4. Right-click your NetBeans IDE project and select Clean and Build.

  5. Package and deploy your invoice presentation customizations to your Billing Care domain.

    For more information, see "Packaging and Deploying Customizations".

  6. Verify your changes in Billing Care.

Extending the Billing Care Data Model with XSD and JSON Files

The Billing Care SDK includes a Data Model Generator utility for generating the required XSD and JSON files containing the custom payment type definitions. The Data Model Generator is located in the SDK_home/samples/data_model_generator directory. Use this sample to assist you in customizing Billing Care with custom payment types.

Note:

The Data Model Generator utility requires an Infranet.properties file configured with BRM connection information in the local user's home directory. The utility connects to the BRM system defined in this file to retrieve the object configuration before generating the required XSD and JSON files. See "Configuring Additional Settings in the Infranet.properties File" in Billing Care Installation Guide for more information.

To create the required XSD and JSON files for your custom payment type:

  1. Open a command-line interface on the system where the Billing Care SDK is installed.

  2. Change to the SDK_home/samples/data_model_generator directory.

  3. Run the DatamodelGenerator.bat (Windows) or DataModelGenerator.sh (Linux) script to generate the XSD and JSON files.

The Data Model Generator outputs the extensionDataModel.jar containing the XSD files and an XSD file containing the definition of your custom payment type. Add these files to your NetBeans IDE project. See "Adding the XSD and JSON Files to NetBeans Project" for more information on adding the files to your project.

Adding the XSD and JSON Files to NetBeans Project

To add the extensionDataModel.jar containing the XSD files for your custom payment type, and the JSON files created by the Data Model Generator:

  1. Add the extensionDataModel.jar to your Billing Care customization NetBeans IDE project using the NetBeans Library Manager.

  2. Copy the JSON file to myproject/web/custom/jsons where myproject is the project directory of your Billing Care customizations NetBeans IDE project.

  3. Deploy your custom payment type customizations. See "Deploying Customizations" for more information.

Enabling Custom Payment Types in Batch Payment Processing

Batch payment files using custom payment types require the creation of a template file (.pit) before processing by Billing Care. Default template files are provided in SDK_home/references/paymentbatchtemplates. Use a default template to create a template file supporting your custom payment types.

To create a custom payment type template file for batch processing:

  1. Copy an existing default template file from the SDK references directory.

  2. Rename the file for your custom payment type.

  3. Open the file in a text editor.

  4. Update the template file by customizing the sections described in Table 13-1 as needed. You must provide a unique Batch Name for your custom payment type batch file. Example 13-3 shows sample template file for a custom external payment batch.

  5. Copy the custom payment type batch file into the Middleware_home/BatchPaymentTemplates directory, where Middleware_home is the home directory of the Oracle WebLogic Server installation where Billing Care is installed. This is the default location for unprocessed batch payment files. The Billing Care installation enables you to specify an alternative location. Confirm with your administrator to determine where your templates folder is located.

Table 13-1 Configurable Fields in Batch Payment Template File

Section Description

Import

Contains the Batch Name, Data Type, and Start Row fields used to identify the batch type, data type, and file row to start processing at.

Delimiter

Contains a list of supported delimiters. Set the delimiter used in your custom payment type batch file by changing the value of the proper delimiter to 1. By default, the delimiter is set to Tab.

Header

Contains fields used to specify whether to import the file header, and the header start and end rows.

Footer

Contains fields used to specify whether to import the file footer, and the footer start and end rows.

Example 13-3 Sample Custom External Check Payment Batch Template File

# Modifying this file is not recommended.
[Import]
Batch Name External Check Payment Batch
Data Type	0
Start Row	1
[Delimiter]
Comma	0
Consecutive	0
Other	0
Semicolon	0
Space	0
MultiSpaces	0
Tab	1
OtherSep	
Qualifier	\"
[Link]
[Header]
ImportHeaderData	0
HeaderStart Row	1
HeaderEnd Row	1
[Header Link]
[Footer]
ImportFooterData	0
FooterStart Row	1
FooterEnd Row	1
[Footer Link]

Deploying Customizations

Package and deploy your customizations using one of the methods described in "Using an Exploded Archive during Customization" or "Packaging and Deploying Customizations".