VerifyCardPayment
The VerifyCardPayment activity is used in workflows for sequences that contain a form with the Credit Card Payment component. The activity validates that the information received when the payment was processed matches the payment details for the provided transaction identifier that was returned when the payment was processed. A payment can be processed using the ACI, IATS, or PayPal payment gateways.
If the VerifyCardPayment activity is missing in the workflow for the sequence that contains the Credit Card Payment component, the transaction identifier will be null, and the form with the Credit Card Payment component will show a validation message or return an "event not verified" error.
The placement of the VerifyCardPayment activity must be in the Next transition from the form that contains the Credit Card Payment component.
The transition out of the form that has the Credit Card Payment component has to keep its the default name, i.e., “Next”. Do not change this default for this particular form. When receiving the post back from the payment site, Forms Builder automatically transitions forward and looks for “Next” on the form. |
The VerifyCardPayment activity does not check for form validation errors. If errors occur, the activity will return to same form, but the state of the form sequence and payment are not guaranteed. You need to ensure that there are no input validation errors prior to the user selecting the "Make Payment" link. |
Capture validation errors using an If activity following the VerifyCardPayment activity. Specify the Condition for the If statement as: formInstance.ValidationMessages.HasErrors.
-
In the Then branch, add a LogLine (e.g., Text = "Verify payment result: " & formInstance.ValidationMessages(0).Message) and a CreateValidationItem activity that displays a message to the user.
-
In the Else branch, place a LogLine activity that records the success of the VerifyCardPayment activity in the log, e.g., "Payment verified using activity."
We recommend setting the Level value to Information for any LogLine or LogObject activities. See Best Practices for Logging and Logging in Azure.
The Condition area of the Next transition contains the expression Not formInstance.ValidationMessages.HasErrors. The Action area leads to the next form in the sequence, in this case, a payment confirmation form.
Properties