PayPal passes this back as part of the IPN post, and being able to query on this (instead of relying on the serialized value in the details column) is very valuable. This relatively simple patch adds this column to the table, and also pulls the value out of PayPal's IPN post. I'm not familiar with the other gateway this module supports, but since the field isn't required, this shouldn't break anything.
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | simple_payments.839952.patch | 2 KB | jhedstrom |
| simple_payments.payer_email.patch | 1.7 KB | jhedstrom |
Comments
Comment #1
BenK commentedSubscribing...
Comment #2
osopolarWhat importance does the payer_email have? It's not necessarily the same as the users account email address. I think more important is to have direct access to the transaction id (txn_id). This is also more general because somehow all gateways are using something like a transaction id. For paypal its important to be able to query for a transaction ID (@see i.e. #875910: Duplicates in the simple_payment table for PayPal payments - more validation required).
Comment #3
jbrown commented@jhedstrom does the uid field not do what you require?
Maybe there should be db fields for gateway-specific payer reference, payee reference and transaction reference.
Comment #4
jhedstromFor the particular use case we're using this module, all of the payments come from anonymous users, so the uid is of little value there. The e-mail is already passed back and stored in a serialized array, but unfortunately, this can't easily be queried on.
Comment #5
jbrown commentedI'm happy for there to be db fields for payer reference, payee reference and transaction reference.
Comment #6
jhedstromjbrown, would the idea then be that instead of being specific to the email, payer_reference could contain arbitrary data? That solution would work for the use case I'm working if, in the case of paypal, it populated that field with the payer's e-mail address. I can reroll the patch if that's what you were thinking.
Comment #7
jhedstromHere is a patch that adds payer_reference, payee_reference, and transaction_reference. It also adds the proper mappings from the PayPal IPN response so these fields are populated. An update hook is provided to add the fields to existing sites.
Comment #8
seanberto commented.
Comment #9
jbrown commentedhttp://drupal.org/cvs?commit=454936