Drupal commerce payment module workflow
I posted this on the Drupal commerce discussion board, but I think that may not have been the correct place, since this is a more general developers question. Perhaps you can help...
I'm creating a new payment module for bank's VPC api. This is an offsite payment portal.
All seems good, however, there is only one message that the bank sends to confirm payment. There is no second notification to confirm payment, like Paypal's IPN.
When I create the transaction and save it as COMMERCE_PAYMENT_STATUS_SUCCESS, commerce saves the status as "Pending".
What should the actual status be, to indicate the correct stage in the workflow for the site owner, and how do I set the status to this state?
I only ask, because I'm unsure if I should be doing more here. It looks as if this is the correct way to do it, so that site configuration can add to this state. But my query is really because the bank's api goes against the workflow that's assumed workflow in Drupal - i.e. the initial response from the API call is the bank's confirmation of payment. Should it be left in the pending state, and the merchant should then go in for each transaction, check payment and update the status manually, or should my code update the state to some other state, automatically?
Thanks in advance for your help.