PosiPay v0.67-v0.68

Release Date: 23May2024

URL: /packaging/installPackage.apexp?p0=04tOZ00000012z3YAA

 

 Enhancement

Generated Bank Slip

  • When generating a bank slip file to a Bank Deposit Batch record,

    • A bank slip file will be generated → existing functionality

    • On the generated bank slip file, the font style of ALL of the texts is changed to monospaced Courier font

    • On the generated bank slip file which is in a PDF file format,

      • The Cheque Date is renamed to Check Date

      • The Cheque Total is renamed to Check Total

 

New Features

PosiPay Settings page

  • On the PosiPay Settings tab, the PosiPay Settings page will load,

    • On the Activate Batch Processes section,

      • A table is displayed with the available batch to schedule or run immediately which is the Gateway Settlement Reconciliation

      • When the Start Job button is clicked,

        • The gateway settlement reconciliation process will be scheduled to run every 3:00 AM

        • When the gateway settlement reconciliation process has been scheduled, the Start Job button is renamed to Stop Job

          • When the Stop Job button is clicked,

            • The schedule of the gateway settlement reconciliation process will be deleted

            • The Stop Job button is renamed back to Start Job

      • When the Run Now button is clicked,

        • The gateway settlement reconciliation process will be executed immediately

        • The progress bar will represent the progress of the executed batch job

    • On the General Settings section,

      • The following fields are auto-populated based on the PosiPay Settings custom setting:

        • Default Gateway Account (UI) = Default Gateway Account (field)

        • Default Bank Account (UI) = Default Bank Account (field)

        • Use Payment Instrument (UI) = Use Payment Instrument (field)

      • When you click/hover the help icon of the Default Gateway Account field,

        • A help text will display: The default gateway account on the org.

      • When you click/hover the help icon of the Default Bank Account field,

        • A help text will display: The default bank account on the org.

      • When you click/hover the help icon of the Use Payment Instrument field,

        • A help text will display: Once enabled, PosiPay will create a Payment Instrument record to store payment details. Otherwise, PosiPay will create a Payment Source record instead. Payment Instruments are only available with Industry Cloud.

    • When the Save button is clicked,

      • The following fields are mapped to the PosiPay Settings custom setting:

        • Default Gateway Account (field) = Default Gateway Account (UI)

        • Default Bank Account (field) = Default Bank Account (UI)

        • Use Payment Instrument (field) = Use Payment Instrument (UI)

 

Save the Risk Level and Risk Score of a Payment

  • On the Gateway Account object,

    • Create a picklist (multi-select) field called Fraud Trigger,

      • Description - Select which responses from the gateway will identify and categorize a Gateway Transaction as potentially fraudulent.

        • Make sure to translate the description of the Fraud Trigger field where the “Categorize” word is translated to “Categorise” → update PosiPay’s owned STF file with translated words

      • Picklist:

        • Blocked

        • Manual Review

        • Issuer Declined

  • On the Gateway Transaction object,

    • Create the following fields:

      • Risk Level (text (80))

        • Description - The risk level of the payment based on Stripe Radar’s evaluation of the riskiness of the payment.

      • Risk Score (number (3, 0))

        • Description - The risk score of the payment based on Stripe Radar’s evaluation of the riskiness of the payment.

  • Update the invocable apex class for the parsing of payload from the webhook events,

    • Output parameters (invocable variables):

      • Risk Level

      • Risk Score

    • The existing functionality will be followed when parsing a payload

    • Update the mapping of the parsed values to the output parameters,

      • If the Gateway Event’s Webhook Event Object = charge,

        • If the webhook event type = charge.failed, map the following additional values to the invocable variables:

          • Risk Level = Risk Level (dataobjectoutcomerisk_level) from the parsed payload

          • Risk Score = Risk Level (dataobjectoutcomerisk_score) from the parsed payload

          • Result Message

            • If the Gateway Account’s Fraud Trigger field is NOT empty,

              • If the Outcome Type = Gateway Account’s Fraud Trigger (blocked = Blocked, manual_review = Manual Review, issuer_declined = Issuer Declined),

                • Map the Seller Message (dataobjectoutcomeseller_message) from the parsed payload

              • If the Outcome Type != Gateway Account’s Fraud Trigger (blocked = Blocked, manual_review = Manual Review, issuer_declined = Issuer Declined),

                • Map the Failure Message (dataobjectfailure_message) from the parsed payload

            • If the Gateway Account’s Fraud Trigger field is EMPTY,

              • If the Outcome Type = blocked,

                • Map the Seller Message (dataobjectoutcomeseller_message) from the parsed payload

              • If the Outcome Type != blocked,

                • Map the Failure Message (dataobjectfailure_message) from the parsed payload

          • Other existing mapping will be followed

        • If the webhook event type = charge.succeeded, map the following additional values to the invocable variables:

          • Risk Level = Risk Level (dataobjectoutcomerisk_level) from the parsed payload

          • Risk Score = Risk Level (dataobjectoutcomerisk_score) from the parsed payload

          • Other existing mapping will be followed

  • Update the record-triggered flow for the Gateway Event object,

    • On the record creation/update,

      • If the Gateway Event’s Webhook Event Object = charge,

        • If the Webhook Event Type output parameter = charge.failed, map the values of the parsed payload to the Gateway Transaction record:

          • Risk Level = Risk Level output parameter

          • Risk Score = Risk Score output parameter

          • Flagged As Fraud

            • If the Gateway Account’s Fraud Trigger field is NOT empty,

              • If the Outcome Type = Gateway Account’s Fraud Trigger (blocked = Blocked, manual_review = Manual Review, issuer_declined = Issuer Declined),

                • Set Flagged as Fraud to TRUE

              • If the Outcome Type != Gateway Account’s Fraud Trigger (blocked = Blocked, manual_review = Manual Review, issuer_declined = Issuer Declined),

                • Set Flagged as Fraud to FALSE

            • If the Gateway Account’s Fraud Trigger field is EMPTY,

              • If the Outcome Type = blocked,

                • Set Flagged as Fraud to TRUE

              • If the Outcome Type != blocked,

                • Set Flagged as Fraud to FALSE

          • Result Message = Result Message output parameter

          • Other existing mapping will be followed

        • If the Webhook Event Type output parameter = charge.succeeded, map the values of the parsed payload to the Gateway Transaction record:

          • Risk Level = Risk Level output parameter

          • Risk Score = Risk Score output parameter

          • Other existing mapping will be followed

 

Payment Instrument object,

  • Create a text (6) field called Card BIN

    • Description - The first six digits of the card number.

 

Payment Source object,

  • Create a text (6) field called Card BIN

    • Description - The first six digits of the card number.

 

Stripe Element Form

  • Additional attribute:

    • Card BIN (output) → The first six digits of the card number.

      • Logic:

        • Parse the response and check if iin is included in the response,

          • If yes, capture the value of iin

          • If no, do nothing

        • For the Stripe customer form,

          • If the Save Payment Source/Instrument attribute is TRUE,

            • If PosiPay Settings custom setting’s Use Payment Instrument is FALSE,

              • On the Payment Source record creation, map the value of iin to Card BIN

            • If PosiPay Settings custom setting’s Use Payment Instrument is TRUE,

              • On the Payment Instrument record creation, map the value of iin to Card BIN

          • If the Save Payment Source/Instrument attribute is FALSE,

            • Do nothing

        • Return the value of iin by mapping it to the Card BIN attribute

    • External Metadata (input) → Receives external metadata in JSON string format.

      • Parse the JSON string from the External Metadata attribute

      • Extract the key-value pairs from the parsed JSON string

      • On the API callout execution,

        • Add the extracted key-value pairs to the metadata below in our key-value pairs

 Bug Fix

  • Fix Gateway Transaction Automation with Order

    • Scenario: When processing a payment on the Order record via the Process Payment button, even though the payment is successfully processed where a Gateway Transaction record is created, the Order record and Order’s Gift Transaction record are NOT paid.

    • When processing an order payment via the Process Payment page (Process Payment button in Order record detail page),

      • If the Payment Method = Credit Card OR BECS Debit,

        • The payment will be processed (internal)

        • A Payment Instrument record is created and linked to the Order’s Gift Transaction record

        • A Gateway Transaction record is created and linked to the Order record

        • The Order record is updated where:

          • Status

            • If the Gateway Transaction’s Transaction Status = Successful, the Status is Paid

            • If the Gateway Transaction’s Transaction Status = Failed, the Status is Failed

        • The Order’s Gift Transaction record is updated where:

          • Status

            • If the Order’s Status = Paid, the Status is Paid

            • If the Order’s Status = Failed, the Status is Failed

        • The Order’s Gift Transaction record is linked to the Gateway Transaction record