the following is from a kind review by rszrama:
Instead of using a custom table to track incoming bank transfers, you could create on submit a "pending" payment transaction for the order with the message being something along the lines of "Awaiting bank transfer from customer." This will then show up on the order's Payment tab. Then you can define a local action for the transaction that lets the administrator mark when a payment has been received. This would work similar to the local action menu items in my commerce_authnet module for capturing / voiding / crediting against an existing transaction. If you do this, you can get rid of your custom table altogether, making your .install just a removal of variables.
Additionally, if you aren't using a callback, it doesn't have to be present. So, if you do what I recommend above, you'll keep the submit_form_submit callback but can remove the submit_form_validate callback.
I don't have time to work on this in the near future.. hope someone can step up with a patch for this!
| Comment | File | Size | Author |
|---|---|---|---|
| #12 | 1190946-confirmation-access-control-2.patch | 1.89 KB | svendecabooter |
| #9 | 1190946-confirmation-access-control.patch | 2.27 KB | thimothoeye |
| #3 | 1190946-full.patch | 7.3 KB | stroobl |
| #2 | 1190946_create_commerce_transaction.patch | 1.88 KB | stroobl |
Comments
Comment #1
yannisc commentedI think it would be best to have the bank details shown on checkout completion page, set the order in pending state and send bank details to the email as well.
I'm trying to do the above, but I'm stuck as I don't know which hook to use to alter to show the bank details at the checkout completion page.
I tried the hook_commerce_checkout_page_info_alter hook, but it seems that this function doesn't have access to the bank details array.
Comment #2
stroobl commentedThis patch creates the transaction in commerce_payment_transaction in a pending state and removes submit_form_validate. I guess you can also remove the table commerce_payment_bank_transfer from the module .install file if you use this.
I still have to find out how to define the action that allows to set the payment status from pending to success.
Comment #3
stroobl commentedThis should be the complete patch. You can now confirm a payment with the "Confirm payment" link in an order's payment tab.
Comment #4
xibun commentedthanks stroobl! I will try to review this weekend.
Comment #5
xibun commentedworks perfectly on my localhost. patch committed. thanks again.
@yannisc: please open (a) new issue(s) for the tasks you mentioned. the original intent of this issue was addressed by stroobl's patch.
Comment #6
-otto- commentedHi,
the 'confirm payment' link also shows up for other payment methods which do not need this link.
I've tried to find a fix for this, but so far, no luck. There should be a check somewhere in the code to only show this link for bank transfer payment method.
Any suggestions?
Comment #7
xibun commentedlet me revert the state of the issue so we don't loose it out of sight.
Comment #8
svendecabootersubscribe
Comment #9
thimothoeye commentedThis removes the link for transactions that aren't bank transfers and haven't been completed. I changed the access callback function to outrule other transactions.
Comment #10
pardalman commentedsubs
Comment #11
derjochenmeyer commentedlooks good to me
Comment #12
svendecabooterHere is an updated patch, because the patch above doesn't work with the latest code of Drupal Commerce.
Specifically the access callback function parameters changed in #1252226: commerce_payment_transaction entity specifies invalid access callback.
Comment #13
Anonymous (not verified) commentedI manually applied the patch from #12 and it worked for me!
Comment #14
xibun commentedthanks thimothoeye and svendecabooter! patch committed.