Posted by jbrown on November 19, 2009 at 9:39am
2 followers
| Project: | Paypal Payment for Invoice |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | cweagans |
| Status: | needs work |
Issue Summary
You could use my Simple payments module as the backend instead of re-inventing the wheel.
Implement hook_simple_payment_process() to record when an invoice has been paid.
Comments
#1
Oh! I'll look at migrating to that at some point.
Right now, I just kind of needed to get this out the door and it does the basics.
In the future, for sure though. Thanks for the pointer!
#2
Changed my mind. Simple Payments really is simple enough for everyday use. I hit a couple of barriers with it, but I think it's a great module :)
Patch attached. Could you take a look at the approach taken and verify that it was the correct way to go (or not)?
Thanks!
#3
Whoops. Wrong patch.
#4
drupal_get_destination() doesn't return a path, so can't be passed in the first parameter of url.
just do url('node/' . $node->nid, array('absolute' => TRUE))
simple_payments is designed to attach an nid to a payment - just set vars['nid'] to $node->nid and then flag based on $payment['nid'].
You need to verify that the correct amount was paid in the payment hook. simple_payments does not cryptographically sign the payment vars.