I seems cannot find a step-by-step how to develop/integrate a hosted payment module. Maybe an example with comparison with implementation such as Paypal, or 2CO. The actual payment system is not handled by the local site but instead the system will send the customer to another site where the payment will be made and then the other site will pass the customer back to the local site where information will be past to complete the receipt on the system.
The best way to learn how to do that is studing the 2CO module, it does exact what you whant, maybe you just need to change a few fields and the target adress.
That's actually I am doing, but haven gone into detail yet. When comparing with paypal, there's some differences, of course but where should I put attention on.
Anyway, I have found this about parameters from 2checkout :
https://www.2checkout.com/documentation/UsersGuide2/third_party_carts/2c...
I am summairizing into the following function. But I am hoping If there's a better explanation and it actually doing ...
1. function uc_2checkout_menu($may_cache) {
// Drupal Implementation of hook_menu().
2. function uc_2checkout_form_alter($form_id, &$form) {
// Drupal Implementation of hook_form_alter(). Perform alterations before a form is rendered - add 2checkout_form
3. function uc_2checkout_payment_method() {
// Ubercart Implementation of hook_payment_method()- add 2Checkout payment method
4. function uc_payment_method_2checkout($op, &$arg1) {
//Callback for 2Checkout payment method settings - setting require to setup 2Checkout
5. function uc_2checkout_form($order)
// Form to build the submission to 2Checkout.com. This will list down proprietary set of parameters 2Checkout.com that you can use. Use variable_get() to get the parameter. The parameter must be the same as what provided by 2checkout.
$form['#action'] is the Payment Routine URL
6. function uc_2checkout_complete($cart_id = 0)
Ubercart can receive back all of the parameters that were passed from 2checkout.
