Skip to main content

Oracle Commerce Cloud

The goal of this document is to describe the step-by-step process for using PicPay as a payment acquirer within your e-commerce site on Oracle Commerce Cloud.

Step-by-Step:

1. Obtaining Your Integration Keysโ€‹

Before starting your integration, you must have valid credentials. Your integration keys will be available in the Business Panel, under the integrations menu. These keys must be copied and entered into your Oracle configuration panel.

Checkout Production Credentials Screen

2. Enabling PicPay Gateway as a Payment Methodโ€‹

Before starting your integration, you must have valid credentials. Your integration keys will be available in the Business Panel, under the integrations menu. These keys must be copied and entered into your Oracle configuration panel.

  1. The client should access the Oracle platform panel

  2. In the left side menu, click "Settings"

Left side menu with Settings option selected
  1. Then click "Extensions"
Menu with Extensions option selected
  1. Under "Developer" click "Generate ID", add the name "PaymentGatewayPicPay", then click save and copy the ID
Instructions to generate id
  1. Extract the "PicPayPaymentGateway" file if received in .zip format, access the "ext.json" file and paste the ID generated in the previous step
Content extracted from PicPayPaymentGateway.zip file
  1. Recreate the zip file with the "gateway" folder and the "ext.json" file named "PicPayPaymentGateway"
Demo of new regenerated PicPaymentGateway.zip file
  1. In Extensions, select the "Installed" tab, click "Upload extension" and select the zip file
Instructions for uploading the PicPaymentGateway.zip file
  1. Check the list
Screen after uploading the PicPaymentGateway.zip file
  1. Click "Payment Processing", then "Payment Gateways", and find the "PicPay Payment Gateway" option in the drop-down
Screen displaying the PicPay Payment Gateway option after uploading the file in the previous step
  1. Enable the gateway by checking the "Payment Gateway Enabled" checkbox, the options "Pay by Card" for credit card and "Wallet" for cash. Fill in the "Client id" and "Client Secret" fields with the integration keys obtained from the PicPay panel and finally click "Save" at the bottom right
Screen instructions on how to fill in the Client Id and Client Secret fields

3. Configuring Webhook OCCโ€‹

  1. Access the Oracle panel, in the upper left corner click "Settings", "Web APIs" and then click "Webhook"
Instructions for finding the fields for the next step
  1. Locate the following webhooks and fill in with the user and password generated by you:
    • Credit Card Payment (Production and View)

      Credit Card Configuration Screen
    • Generic Payment (Production and View)

      Generic Payment Configuration Screen
    • Click "Save" in the bottom right corner to confirm the changes

4. Installing Payment Plugin โ€“ SSEโ€‹

  1. Extract the picpay.sse.payments file if received in .zip format
  2. Configure the variables with your environment data in the path picpay.sse.payments\src\config
How to configure variables with data from your environments

Fields:

  • OCC_ADMIN_URL: URL of your Oracle Commerce Cloud environment

  • OCC_API_KEY: Oracle generated Application Key in settings/webAPI, click "Register application", it will be generated in the format

xxJ0xxAxOxJX0QxLCJxbXxxOxJxUxI0NxJ0.xxJxdxWxOxI0YxNxOx-0xNx-L0xMx-0XxXx0X0X0Z0XxXxxUx0.xxJpx0xxOxJxxHxxWNxxVxxOnxxFxxGxx0xx.xx.x0VA/xxLS+xx+N0GLT/xxF0 0YxQQUBL0xxM+xxSFxU=
  • BASIC_AUTH_USER and BASIC_AUTH_PASS: User and password generated by you, will be used between the webhook and the plugin.

  • URL_PICPAY: PicPay order submission URL, default environments dev and tst for sandbox and prd for production.

  • KEY_WEBHOOK: API KEY in the format x00x0000-xxx0-0xxx-xx00-00000000xxxx, to obtain this information just access the PicPay business panel, "Settings" and "My checkout".

Screen where the API Key field is found
  1. Verify that the DOCUMENT_FIELD_NAME field responsible for sending the buyer's CPF is correctly configured. Access src\app\constants\index.js and find the DOCUMENT_FIELD_NAME constant
Image of the DOCUMENT_FIELD_NAME constant
  1. Plugin Upload: Deploy the SSE using an API platform such as Postman, Insomnia, or Forest.
Plugin upload result on the Platform

ย ย ย ย ย Link to Oracle's official documentation: https://docs.oracle.com/en/cloud/saas/cxcommerce/21b/ccdev/develop-server-side-extensions.html

  1. Optional: To verify that the deployment was successful, observe the request return as HTTP 200 and the success field. It can be validated by your Oracle URL + /ccstorex/custom/v1/verify or by the list of SSEs.
Verifying Success in Oracle Verifying Success in Oracle

After validating the upload, just finalize the orders in Oracle Cloud Commerce.

5. Obtaining Plugin Logsโ€‹

  1. Make an HTTP GET request
Return of the HTTP request to obtain the plugin logs

ย ย ย ย Supporting Material: https://docs.oracle.com/en/cloud/saas/cx-commerce/cxocc/opccadminx-custom-v1-logs-get.htm