Hello,
First all, id like to say you guys did an awesome job with this new ecommerce script.
I created a custom payment method, although when creating it I would've enjoy having an extra argument somewhere in the hook_submit_form.
That argument would tell us if the form is being callback from the administration or is it being called by a front end user. Adding the argument in the form: commerce_payment_order_transaction_add_form where the commerce_payment_method_callback is being called.
If there is one already please let me know.
Thanks.
Comments
Comment #1
damien tournoud commentedThanks for reporting this. Actually, the
$checkout_paneargument ofCALLBACK_commerce_payment_method_submit_form()will beNULLfor admin-submitted payments. You can rely on this.Could you please roll a patch for the documentation block of
CALLBACK_commerce_payment_method_submit_form()to make this clear?Comment #2
webadpro commentedI think this should work.
Comment #3
damien tournoud commentedThanks for the patch! I reformatted it to fit in the 80 column limit, and merged it into 7.x-1.x.
Comment #4
webadpro commentedGreat and thanks for the tip of 80 column limit. I wasn't aware of that.
Comment #5.0
(not verified) commentedMinor Error