Paypal payment gateway possibility

Permalink Browser Info Environment
Hello,

I would like to check if the form can be integrated with Paypal to make a payment?

I have a form to enable the users to buy one of the packeges/ plans, like

- Plan A: $10
- Plan B: $15

When the user selects one of the above options and form is submitted, I would like the user to be redirected to Paypal to make a payment, based on what is selected by the user, once the form is successfully saved in the database and emails are sent.

I look forward to your guidance and support.

Kind regards,
Lalit

Type: Discussion
Status: In Progress
lalitesh
View Replies:
DeWebmakers replied on at Permalink Reply
DeWebmakers
Hi,

It's not integrated, but can be done... It requires some coding though.
Formidable uses events, so you can use a specific event for redirecting to the payment, after
that returning to a thank you page and again trigger an event.
It's pretty expert coding, but can be done.

Best,

Corretje
lalitesh replied on at Permalink Reply
lalitesh
Hi Corretje,

Appreciate your quick response.

Could you let me know when do I handle the event and any example code for the same?

Best Regards!
DeWebmakers replied on at Permalink Reply
DeWebmakers
Hi,

Sorry for the late reply! Very busy on my end... Sorry!
Here is some example code:

// Event: on_formidable_submit
// Params: form (FormidableForm Object)
// Params: data (array)
// When: Is fired on successfull submission of the form
Events::addListener('on_formidable_submit', function($event) {
    // FormidableForm Object
    $form = $event->getArgument('form');
    //if (is_object($form)) Log::info(t('Formidable Full "%s" succesful submitted', $form->getLabel()));
    // Posted data
    $data = $event->getArgument('data');
    // Result Object
    $result = $event->getArgument('result');
    //if (is_object($form)) Log::info(t('New result (answerSetID) created: %s', $result->getAnswerSetID()));
    // Example code for sending registration to MailChimp
    // NOTE! This code isn't tested and is just for here as example code


Hope this helps!

concrete5 Environment Information

ConcreteCMS 9

Browser User-Agent String

Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36

Hide Post Content

This will replace the post content with the message: "Content has been removed by an Administrator"

Hide Content

Request Refund

You have not specified a license for this support ticket. You must have a valid license assigned to a support ticket to request a refund.