...
URL: /packaging/installPackage.apexp?p0=04tOZ0000002GDZYA2
Info |
---|
Bug Fix |
...
Disable Gateway Account
...
Stripe Payment Form - Enhance Payment Confirmation for MOTO Payments to Prevent Multiple Payment Intent in one Payment Session
Gateway Settlement Reconciliation Batch
...
When
...
Charges in
...
payout are over 50,000 the reconciliation will processed successfully.
Source Transaction
...
Linked for Adjustment Gateway Transactions in Gateway Settlement
...
Revamp Disable Gateway Account
...
Validate Gateway Account's Webhook on the Stripe Account
...
Active Gateway Account Checking Global Function
...
Webhook Parsing - Active Gateway Account Checking
...
Stripe Payment Form - Active Gateway Account Checking
...
Stripe Customer Form - Active Gateway Account Checking
...
Invoice API - Active Gateway Account Checking
...
Cancel Invoice API - Active Gateway Account Checking
...
Gateway Transaction’s Refund Payment - Active Gateway Account Checking
...
Gateway Settlement Reconciliation - Active Gateway Account Checking
...
Return Card BIN From Payment Form
...
Remove Bank Statement Name Because it has a duplicate
...
Remove ‘Use Payment Instrument’ in PosiPay Settings and its Field Reference in Stripe Customer Form
Info |
---|
Post-Config |
Permission Set
Assign the following permission set to the user want to use the feature.
· PosiPay
Digital Experiences
Note: This config is only for the webhook guest user, not the guest user for Stripe Form.
Create Community Site, then enable Public Access then Publish
Configure access profile for guest
a. Apex Class Access
i. WebhookListener
b. Object Access
i. GatewayEvent = Create/Read
Fields:
a. Event ID
b. Event Status
c. Gateway Account
d. Raw Request
e. Webhook Event Object
ii. GatewayAccount = Create/Read
Fields:
a. API Token
b. Accepted Card
c. Accepted Currency
d. Active
e. Base URL
f. Default Currency
g. Description
h. Enable 3d Secure
i. Enable Live Payment from Sandbox
j. Fraud Trigger
k. Gateway Provider
l. Payment Method
m. Publishable Key
n. Sandbox
o. Version
p. Webhook Endpoint URL
q. Unrequire CVC in Batch Gift Entry
iii. PosiPay Log = Create/Read
Fields:
a. Description
b. Details
c. Source
d. Type
iv. Gateway Invoice
Fields:
a. Amount Paid
b. Attempt Count
c. Gateway Event
d. Gift Transaction
e. Gift Transaction ID
f. Invoice Date
g. Invoice ID
h. Invoice Status
i. Payment Intent ID
Sharing Settings
GatewayAccount for Webhook Guest User
a. Criteria: Active = true
Create Gateway Account Record
Fill in the following fields.
a. Gateway Account Name = any
b. API Token = Secret key from Stripe Account
c. Publishable Key = Publishable key from Stripe Account
d. Version = v1
e. Base URL = URL from the created Community Site
f. Gateway Provider
g. Active = false
h. Sandbox = true/false
i. Note: TRUE indicates that the gateway account is in sandbox mode while FALSE indicates that the gateway account is in live mode.
i. Enable 3D Secure = true/false
j. Enable Live Payments from Sandbox = true/false
k. Accepted Currency =
i. AUD
ii. NZD
iii. USD
iv. select all
l. Fraud Trigger =
i. Blocked
ii. Manual Review
iii. Issuer Declined
iv. select all
m. Default Currency =
i. AUD
ii. NZD
iii. USD
n. Payment Method =
i. Cash
ii. Credit Card
iii. BECS Debit
iv. Check
v. Direct Deposit
vi. Select all
o. Accepted Card
i. Visa
ii. Mastercard
iii. American Express
iv. Discover
v. Select all
Then click the Authenticate button after the record save.
Setup Stripe Dashboard Webhook ( https://dashboard.stripe.com )
Developers > Webhooks > Add endpoint button. Disclaimer: This step is from old UI
· Endpoint URL: Webhook Endpoint URL fields from the created Gateway Account record above.
· Then click + Select events
· Then select following events
o charge.failed
o charge.pending
o charge.refunded
o charge.succeeded
o charge.updated
o invoice.created (remove this event if PosiPay version is 92 and above)
o invoice.payment_failed
o invoice.payment_succeeded
o invoice.updated (remove this event if PosiPay version is 92 and above)
o payout.failed
o payout.paid
o payment_intent.canceled
o invoice.marked_uncollectible
· Ensure that you use only one endpoint or webhook URL per Stripe account. Using multiple endpoints or webhook URLs can cause errors in processing transactions.
Custom Settings
· PosiPay Settings
· Default Gateway Account fields = Gateway Account Id for Default
Object Manager:
Bank Account
Page Layouts and Lightning Record Pages
Fields
· Active
· Bank Account Number
· Bank Code
Bank Deposit Batch
Page Layouts and Lightning Record Pages
Fields
· Bank Account
· Batch Status
· Status Message
· When Generated
· Bank Reconciliation Status
· Bank Statement Line
· Settlement Date
Mobile & Lightning Action
· Generate Bank Slip
Contact
Page Layouts and Lightning Record Pages
Fields
· Default Gateway Customer
Gateway Account
Page Layouts and Lightning Record Pages
Fields
· API Token
· Accepted Card
· Accepted Currency
· Active
· Base URL
· Default Currency
· Description
· Enable 3D Secure
· Enable Live Payments from Sandbox
· Faud Trigger
· Gateway Provider
· Payment Method
· Publishable Key
· Sandbox
· Version
· Webhook Endpoint URL
Mobile & Lightning Actions
· Authenticate
Gateway Customer
Page Layout and Lighting Record Pages
Fields
· Customer Address
· Customer Email
· Customer ID
· Customer Phone
· Customer
· Default Payment Source
· Gateway Account
Gateway Event
Page Layout and Lighting Record Pages
Fields
· Event ID
· Event Status
· Gateway Account
· Raw Request
· Webhook Event Object
Gateway Invoice
Page Layout and Lighting Record Pages
Fields
· Amount Paid
· Attempt Count
· Gateway Event
· Invoice Date
· Invoice ID
· Invoice Status
· Payment Intent ID
Gateway Transaction
Fields & Relationships
Transaction Status
· Add picklist value
i. Canceled
ii. Dispute Under Review
Page Layout and Lighting Record Pages
Fields
· Adjustment Date
· Adjustment ID
· Amount
· Balance Transaction
· Charge ID
· Decline Code
· Flagged As Fraud
· Gateway Account
· Gateway Event
· Gateway Fee
· Gateway Invoice
· Order
· Payment Date
· Payment Intent Id
· Payment Method
· Process Type
· Refund Date
· Refund Id
· Result Code
· Result Message
· Risk Level
· Risk Score
· Settlement
· Source Transaction
· Transaction Currency
· Transaction Reference ID
· Transaction Status
· Bank Reconciliation Status
· Bank Statement Line
· Receiving Bank Account
· Settlement Date
Mobile & Lightning Actions
· Refund Payment
Order
Fields & Relationships
Status
a. Add a new picklist value called “Paid” where the Status Category is “Activated”
b. Add a new picklist value called “Failed” where the Status Category is “Draft”
Page Layouts and Lightning Record Pages
Fields
· Check Date
· Check Drawer
· Payment Identifier
· Payment Method
· Receiving Bank Account
· Status
· Bank Reconciliation Status
· Bank Statement Line
· Settlement Date
Payment Source
Page Layout and Lightning Record Pages
Fields
· Account Holder Name
· Active
· BSB Number
· Card Expiry Date
· Card Type
· Cardholder Name
· Default Payment Source
· Gateway Account
· Gateway Customer
· Last4 Digit
· Payer
· Payment Source Type
· Token
PosiPay Log
Page Layout and Lightning Record Pages
Fields
· Description
· Details
· Source
· Type
Gateway Settlement
Page Layout and Lightning Record Pages
Fields
· Amount
· Error Code
· Error Message
· Gateway Account
· Gateway Adjustment Total
· Gateway Fee Total
· Gateway Reconciliation Status
· Gateway Reference ID
· Gateway Refund Total
· Reconciliation Balance
· Reconciliation Date
· Starting After
· Stripe Fee Total
· Bank Reconciliation Status
· Bank Statement Line
· Receiving Bank Account
· Settlement Date
Bank Statement
Page Layout and Lightning Record Pages
Fields
· Bank Account
· Bank Statement Name
· Date Reconciled
· Status
Bank Statement Line
Page Layout and Lightning Record Pages
Fields
· Amount
· Bank Statement
· Bank Statement Line Name
· Description
· Reconciliation Status
· Settlement Date
· Transaction Reference
· Transaction Type
Global Picklist
Payment Method
The only picklists are the following; otherwise, please remove them.
· Credit Card
· BECS Debit
· Cash
· Check
· Direct Deposit
Change Data Capture
In the Setup>Change Data Capture add the following if not yet added.
· Gateway Transaction (PosiPay__GatewayTransaction__c)
...
The Gateway Transaction record created for adjustments (related to disputes) should be correctly linked to its Source Transaction (the original Gateway Transaction).
Return Card BIN From Payment Form
Info |
---|
Enhancements |
Disable Gateway Account
You can now disable your Gateway Account if it is no longer used by clicking Disable Gateway Account.
The Gateway Account record is updated where:
API Token = EMPTY
Publishable Key = EMPTY
Active = FALSE
Disable = TRUE
The equivalent Gateway Account Setting record is updated where:
API Token = EMPTY
Publishable Key = EMPTY
Authenticated = FALSE
A notification message will display: The Gateway Account is disabled for use.
Stripe Payment Form
Enhance Payment Confirmation for MOTO Payments to Prevent Multiple Payment Intent in One Payment Session.
When processing a payment on the Stripe payment form,
If the selected payment method is Credit Card,
If the Is MOTO attribute is TRUE,
The Stripe payment form will NOT display the CVC field
If the Is MOTO attribute is FALSE,
The Stripe customer form will display the CVC field
Revamp Disable Gateway Account
Disabling Gateway Account
If the Gateway Account’s Active = FALSE,
An error message will display: This Gateway Account has been disabled.
If the Gateway Account’s Active = TRUE,
A warning message will display: Are you sure you want to disable the Gateway Account? No future payments associated with this Gateway Account will be processed in Salesforce. No pending payments associated with this Gateway Account will be updated in Salesforce.
When proceeding,
The Gateway Account record will be disabled
The Gateway Account record is updated where:
API Token = EMPTY
Publishable Key = EMPTY
Active = FALSE
The Gateway Account’s equivalent Gateway Account Setting record is deleted
Enabling Disabled Gateway Account via Authenticate button
When enabling the gateway via the Authenticate button on the Gateway Account record,
Ensure that the API Token AND/OR Publishable Key are populated, otherwise, it won’t go through and an error message will display stating Please provide gateway credentials.
If the gateway authentication is authenticated and the Gateway Account authentication is successful,
The Gateway Account record will be enabled
The Gateway Account record is updated where:
API Token = EMPTY
Publishable Key = EMPTY
Active = TRUE
The Gateway Account’s equivalent Gateway Account Setting record is updated where:
Authenticated = TRUE
If the gateway authentication has failed,
The Gateway Account record will NOT be enabled
Validate Gateway Account's Webhook on the Stripe Account
Gateway Account record has ONLY one webhook on the Stripe account
Pre-work:
A Gateway Account record NOT authenticate yet.
On the Stripe account, the Gateway Account record has ONLY one configured webhook where the webhook URL = Gateway Account’s Webhook Endpoint URL
When authenticating the gateway credentials via the Authenticate button on the Gateway Account record,
The gateway credentials will be authenticated
If the gateway credentials are correct,
The gateway authentication will be successful
A notification message will display: Gateway authentication successful.
The Gateway Account record is updated where:
Active = TRUE
The Gateway Account’s equivalent Gateway Account Setting record is updated where:
Authenticated = TRUE
If the gateway credentials are incorrect,
The gateway authentication will fail
An error message will display: Gateway authentication fails.
Gateway Account record has MULTIPLE webhooks on the Stripe account
Condition:
A Gateway Account record NOT authenticate yet.
On the Stripe account, the Gateway Account record has MULTIPLE configured webhooks where the webhook URL = Gateway Account’s Webhook Endpoint URL
When authenticating the gateway credentials via the Authenticate button on the Gateway Account record,
The gateway credentials will be authenticated
If the gateway credentials are correct,
The gateway authentication will fail since the Gateway Account record has more than one enabled webhook on the Stripe account
An error message will display: Gateway authentication failed. Multiple webhooks are currently configured for this gateway on the associated Stripe account. Please contact your Stripe administrator.
If the gateway credentials are incorrect,
The gateway authentication will fail
An error message will display: Gateway authentication fails.
Active Gateway Account Checking Global Function
A callable method is added that determines whether a Gateway Account record is active or inactive
A callable method is added for the live and sandbox payment failsafe
Webhook Parsing - Active Gateway Account Checking
Active Gateway Account
When a Gateway Event record is created based on the received payload from Stripe,
If the org is in a Production environment,
The stored payload in the Gateway Event record is parsed
The necessary records are created depending on the parsed payload
If the org is in a Sandbox environment,
If the Gateway Event → Gateway Account’s Sandbox = TRUE (test mode),
The stored payload in the Gateway Event record is parsed
The necessary records are created depending on the parsed payload
If the Gateway Event → Gateway Account’s Sandbox = FALSE (live mode),
If the Gateway Event → Gateway Account’s Enable Live Payments from Sandbox = TRUE,
The stored payload in the Gateway Event record is parsed
The necessary records are created depending on the parsed payload
If the Gateway Event → Gateway Account’s Enable Live Payments from Sandbox = FALSE,
The stored payload in the Gateway Event record is NOT parsed
A PosiPay Log record is created where:
Source = Stripe Webhook Listener
Details = You do not have access to parse live webhook payload for Gateway Event (Gateway Event record ID) in the sandbox. Please contact your System Administrator.
Type = Error
Inactive Gateway Account
Pre-work:
Process a payment using an active Gateway Account record
After the payment processing, deactivate the Gateway Account record
On the Stripe account, resend the equivalent payload of the payment processing
When a Gateway Event record is created based on the received payload from Stripe,
If the org is in a Production environment,
The stored payload in the Gateway Event record is NOT parsed
A PosiPay Log record is created where:
Source = Stripe Webhook Listener
Details = The payload of the Gateway Event (Gateway Event record ID) record has not been parsed because the gateway is inactive. Please contact your System Administrator.
Type = Error
If the org is in a Sandbox environment,
The stored payload in the Gateway Event record is NOT parsed
A PosiPay Log record is created where:
Source = Stripe Webhook Listener
Details = The payload of the Gateway Event (Gateway Event record ID) record has not been parsed because the gateway is inactive. Please contact your System Administrator.
Type = Error
Stripe Payment Form - Active Gateway Account Checking
When the Stripe payment form loads,
If the org is in a Production environment,
If the Gateway Account’s Active = TRUE,
The Stripe payment form will display
If the Gateway Account’s Active = FALSE,
The Stripe payment form will NOT display
An error message will display: Please provide an active gateway. Please contact your System Administrator.
If the org is in a Sandbox environment,
If the Gateway Account’s Active = TRUE,
If the Gateway Account’s Sandbox = TRUE (test mode),
The Stripe payment form will display
If the Gateway Account’s Sandbox = FALSE (live mode),
If the Gateway Account’s Enable Live Payments from Sandbox = TRUE,
The Stripe payment form will display
If the Gateway Account’s Enable Live Payments from Sandbox = FALSE,
The Stripe payment form will NOT display
An error message will display: You do not have access to process live payments in the sandbox. Please contact your System Administrator.
If the Gateway Account’s Active = FALSE,
The Stripe payment form will NOT display
An error message will display: Please provide an active gateway. Please contact your System Administrator.
Stripe Customer Form - Active Gateway Account Checking
Org in Production environment
When the Stripe Customer form loads and the Gateway Account is active (TRUE), the Stripe Customer Form will display.
If the Gateway Account is not active (FALSE) the Stripe Customer form will NOT display and an error message will display: Please provide an active gateway. Please contact your System Administrator.
Org in Sandbox environment
If the Gateway Account is Active [TRUE (test mode)], the Stripe Customer form will display.
If the Gateway Account’s Sandbox is not Active [FALSE (live mode)] and the Gateway Account’s Enable Live Payments from Sandbox is TRUE, the Stripe Customer form will display.
If the Gateway Account’s Enable Live Payments from Sandbox is FALSE, the Stripe Customer form will NOT display , and an error message will display: You do not have access to tokenise live Credit Card/Direct Debit details in the sandbox. Please contact your System Administrator.
If the Gateway Account’s Active is FALSE, the Stripe customer form will NOT display, and an error message will display: Please provide an active gateway. Please contact your System Administrator.
Invoice API - Active Gateway Account Checking
When generating an invoice,
If the org is in a Production environment,
If the Gateway Account’s Active = TRUE,
An invoice will be generated
If the Gateway Account’s Active = FALSE,
NO invoice will be generated
A PosiPay Log record is created where:
Source = Stripe Invoice API
Details = Please provide an active gateway. Please contact your System Administrator.
Type = Error
If the org is in a Sandbox environment,
If the Gateway Account’s Active = TRUE,
If the Gateway Account’s Sandbox = TRUE (test mode),
An invoice will be generated
If the Gateway Account’s Sandbox = FALSE (live mode),
If the Gateway Account’s Enable Live Payments from Sandbox = TRUE,
An invoice will be generated
If the Gateway Account’s Enable Live Payments from Sandbox = FALSE,
NO invoice will be generated
A PosiPay Log record is created where:
Source = Stripe Invoice API
Details = You do not have access to process live invoices in the sandbox. Please contact your System Administrator.
Type = Error
If the Gateway Account’s Active = FALSE,
NO invoice will be generated
A PosiPay Log record is created where:
Source = Stripe Invoice API
Details = Please provide an active gateway. Please contact your System Administrator.
Type = Error
Cancel Invoice API - Active Gateway Account Checking
Pre-requisite:
Generate an invoice and use a soft decline card details
Make sure that a Gateway Invoice record is created where the Invoice Status = Open
When cancelling an invoice via the Cancel Invoice button on the Gateway Invoice record,
If the org is in a Production environment,
If the Gateway Invoice → related Gateway Transaction → Gateway Account’s Active = TRUE,
The invoice will be cancelled
If the Gateway Invoice → related Gateway Transaction → Gateway Account’s Active = FALSE,
The invoice will NOT be cancelled
An error message will display: Please provide an active gateway. Please contact your System Administrator.
If the org is in a Sandbox environment,
If the Gateway Invoice → related Gateway Transaction → Gateway Account’s Active = TRUE,
If the Gateway Invoice → related Gateway Transaction → Gateway Account’s Sandbox = TRUE (test mode),
The invoice will be cancelled
If the Gateway Invoice → related Gateway Transaction → Gateway Account’s Sandbox = FALSE (live mode),
If the Gateway Invoice → related Gateway Transaction → Gateway Account’s Enable Live Payments from Sandbox = TRUE,
The invoice will be cancelled
If the Gateway Invoice → related Gateway Transaction → Gateway Account’s Enable Live Payments from Sandbox = FALSE,
The invoice will NOT be cancelled
An error message will display: You do not have access to cancel live invoices in the sandbox. Please contact your System Administrator.
If the Gateway Invoice → related Gateway Transaction → Gateway Account’s Active = FALSE,
The invoice will NOT be canceled
An error message will display: Please provide an active gateway. Please contact your System Administrator.
Gateway Transaction’s Refund Payment - Active Gateway Account Checking
When refunding a payment via the Refund Payment button on the Gateway Transaction record,
If the org is in a Production environment,
If the Gateway Transaction → Gateway Account’s Active = TRUE,
The Refund Payment page will display
If the Gateway Transaction → Gateway Account’s Active = FALSE,
The Refund Payment page will NOT display
An error message will display: Please provide an active gateway. Please contact your System Administrator.
If the org is in a Sandbox environment,
If the Gateway Transaction → Gateway Account’s Active = TRUE,
If the Gateway Transaction → Gateway Account’s Sandbox = TRUE (test mode),
The Refund Payment page will display
If the Gateway Transaction → Gateway Account’s Sandbox = FALSE (live mode),
If the Gateway Transaction → Gateway Account’s Enable Live Payments from Sandbox = TRUE,
The Refund Payment page will display
If the Gateway Transaction → Gateway Account’s Enable Live Payments from Sandbox = FALSE,
The Refund Payment page will NOT display
An error message will display: You do not have access to refund live payments in the sandbox. Please contact your System Administrator.
If the Gateway Transaction → Gateway Account’s Active = FALSE,
The Refund Payment page will NOT display
An error message will display: Please provide an active gateway. Please contact your System Administrator.
Gateway Settlement Reconciliation - Active Gateway Account Checking
When reconciling Gateway Settlement records via the Gateway Settlement Reconciliation batch job in PosiPay Settings page,
If the org is in a Production environment,
If the Gateway Settlement → Gateway Account’s Active = TRUE,
The Gateway Settlement record will be reconciled
If the Gateway Settlement → Gateway Account’s Active = FALSE,
The Gateway Settlement record will NOT be reconciled
A PosiPay Log record is created where:
Source = Stripe Gateway Settlement Reconciliation
Details = The Gateway Settlement (Gateway Settlement record ID) record has not been reconciled because the gateway is inactive. Please contact your System Administrator.
Type = Error
If the org is in a Sandbox environment,
If the Gateway Settlement → Gateway Account’s Active = TRUE,
If the Gateway Settlement → Gateway Account’s Sandbox = TRUE (test mode),
The Gateway Settlement record will be reconciled
If the Gateway Settlement → Gateway Account’s Sandbox = FALSE (live mode),
If the Gateway Settlement → Gateway Account’s Enable Live Payments from Sandbox = TRUE,
The Gateway Settlement record will be reconciled
If the Gateway Settlement → Gateway Account’s Enable Live Payments from Sandbox = FALSE,
The Gateway Settlement record will NOT be reconciled
A PosiPay Log record is created where:
Source = Stripe Gateway Settlement Reconciliation
Details = You do not have access to reconcile live payout for Gateway Settlement (Gateway Settlement record ID) in the sandbox. Please contact your System Administrator.
Type = Error
If the Gateway Settlement → Gateway Account’s Active = FALSE,
The Gateway Settlement record will NOT be reconciled
A PosiPay Log record is created where:
Source = Stripe Gateway Settlement Reconciliation
Details = The Gateway Settlement (Gateway Settlement record ID) record has not been reconciled because the gateway is inactive. Please contact your System Administrator.
Type = Error
PosiPay Settings
Remove ‘Use Payment Instrument’ in PosiPay Settings and its Field Reference in Stripe Customer Form
When the PosiPay Settings page loads,
On the General Settings section,
The Use Payment Instrument field has been removed
On the PosiPay Settings custom setting,
The Use Payment Instrument field has been deleted
When tokenising a payment details on the Stripe customer form,
If the selected payment method is Credit Card,
The Credit Card details will be tokenised
If the Save Payment Source/Instrument attribute is TRUE,
If the org is an NPC org where the NPC’s standard Payment Instrument object exist, a Payment Instrument record will be created
If the org is NOT an NPC org where the NPC’s standard Payment Instrument object does NOT exist, a Payment Source record will be created
If the Save Payment Source/Instrument attribute is FALSE,
NO Payment Source OR Payment Instrument record will be created
If the selected payment method is BECS Debit,
The BECS Debit details will be tokenised
If the Save Payment Source/Instrument attribute is TRUE,
If the org is an NPC org where the NPC’s standard Payment Instrument object exist, a Payment Instrument record will be created
If the org is NOT an NPC org where the NPC’s standard Payment Instrument object does NOT exist, a Payment Source record will be created
If the Save Payment Source/Instrument attribute is FALSE,
NO Payment Source OR Payment Instrument record will be created