2

I'm adding a simple transactional element to a client site to allow their users to pay a bill online by completing a simple form with a payment amount and a bill reference. Payment will be handled by a payment gateway via a POST.

Simples.

However I'm unsure what the best practice might be in terms of storing this data on the EE side.

In the past I've used the Solspace Freeform module to capture the data, re-display it on a confirmation page and then use that to POST the data to the payment gateway.

One other option is to use a SAEF to submit the data as an entry and do much the same after that.

Which to do... the benefit of using entries is that they are more flexible - the disadvantage is they cannot trigger a notification email to the user and/or client but that can be handled with a simple plug-in if required.

I'm interested to know how others have handled this in the past. Specifically in a scenario like this where an e-commerce module would be complete overkill and the Simple Commerce module isn't an option.

3 Answers 3

2

If you have a method of storing and posting the appropriate data with Safecracker, and all you are worried about is the notification emails, you should have a look at ObjectiveHTML's Postmaster. You can set up emails for almost any event.

2
  • This what I would do too. I would use Safecracker so you get the benefit of a first-party utility + fieldtypes for data entry, and then use Postmaster for the notifications. Jan 30, 2013 at 21:40
  • Thanks Jason - hadn't seen Postmaster before so I'll definitley give that a shot on our next project. :) Feb 14, 2013 at 20:30
0

Non-Freeform/Safecracker:

Simple post-processing of a Safecracker form can be accomplished by setting its redirect URL to be a PHP-enabled template, doing the notification email (or other transactions) in PHP, and then setting a redirect in PHP to the real post-submit page/destination. If PHP is running on output, you can work with segment variables to get EE entries as needed, and run PHP functions on the output of the channel:entries tag. You can fetch your data with EE, and then work with it in PHP.

If you can accomplish the notification email (or other transactions) purely using EE tags with an add-on, you can do this as well. The idea is to establish a post-processor template that handles the notification or transaction, and then redirect from there to your real confirmation page.

Freeform:

Freeform also has a post submit hook that we've leveraged with custom extensions to submit to APIs using PHP/cURL. Our most common use of this has been to submit data to Salesforce after a user has submitted a form using Freeform. Freeform captures the user submit in the CP and sends a notification email, while the extension submits that data behind the scenes to the Salesforce database.

0

We do this with ExpressionEngine Channels, the Tell-a-Friend Form (for the confirmation email to user and client designated staff). We also have Mandrill in place, so we can track the transactional emails. The system works very well. This was set-up pre-PostMaster.

We are considering adding PostMaster to the mix, mostly to remove that half second display when the Tell-a-Friend module is sending the confirmation email. But otherwise, it was simple to set-up, fairly easy to secure, and has worked like a charm for 5+ years.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.