I am looking for a solution where I can collect simple payments from my users but not collect the payment details on drupal server. SO i need to

  1. Attach a payment component to a webform
  2. User can fill up the details and click on pay
  3. On clicking on pay user will be redirected to Authorize.net servers where the user can fill the details and on successful completion return back to Drupal end.

I am using webform_pay module to achieve this. It satisfies most of the points but only problem with this module is it collects the payment details on drupal server which I dont want. Any suggestion?

1 Answer 1


It's pretty easy to implement Authorize.net PHP SDK for this purpose. I also had started with Webform Pay (6.x) but it was not reliable in the fact that if a payment failed, or you wanted to do different form widgets (radio, select, text) to represent dollar value, it wasn't very feasible.

I wound up creating my own module that implements specialized Form API fields (CC number, CC date, CC cvv): https://www.drupal.org/project/creditfield

If you are comfortable with Form API, it is very easy to construct simple payment forms (simple donations, bill pay), and then handle the payment submission in your form submit handler. This module makes it possible to create one or more standard forms with Form API without having to implement the same validations all the time on the credit card fields.

I never had a need to store any data locally, not even the user information. If the payment did not succeed, the error was caught and logged and the user was asked to try again. If it succeeded, all of the submitted information was visible in the Authorize.net transaction logs. Check the SDK payload information to see what is available. It's been a while since I have done one, but you could use the card authorization method to create a transaction to be validated, and then perform the transaction.

For other methods, like off-site payment on a service like Authorize.net, you will probably need the applicable walkthrough. It also looks like the Webform Pay module has been abandoned with no stable Drupal 7 release, so this could be a good opportunity to roll up your sleeves and learn Form API + menu routes.


Your Answer

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

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