Location: PHPKode > scripts > osCommerce pay by sms and phone > oscommerce-pay-by-sms-and-phone/readme.txt
===============================================================================
Payment module through PayGol
===============================================================================


Description:
===============================================================================
To use this module you first need to register for free on PayGol.com
and create a service as "Integrated" type

This module enables your users to pay by sms or phone call for products/services you offer



Installation:
===============================================================================
1) Unzip the archive.
2) add the next files:
/includes/modules/payment/paygol.php
/includes/languages/english/modules/payment/paygol.php
/includes/languages/spanish/modules/payment/paygol.php

3) Modify the next files:
/includes/header.php at line 55 aprox. add this:
<script src="http://www.paygol.com/micropayment/js/paygol.js" type="text/javascript"></script>   

/includes/functions/html_output.php
Add next funtion at line 134 aprox:
function tep_image_submit_paygol($image, $alt = '', $parameters = '') {
    global $language;
    $image_submit = '<input type="image" src="' . tep_output_string(DIR_WS_LANGUAGES . $language . '/images/buttons/' . $image) . '" border="0" alt="' . tep_output_string($alt) . '"';
    if (tep_not_null($alt)) $image_submit .= ' title=" ' . tep_output_string($alt) . ' "';
    if (tep_not_null($parameters)) $image_submit .= ' ' . $parameters;
    $image_submit .= ' onClick="pg_reDirect(this.form)" class="paygol">';
    
    return $image_submit;
  }

Add next function at line 169 aprox:
function tep_draw_form_paygol($name, $method = 'post', $parameters = '') {
    $form = '<form name="' . tep_output_string($name) . '" method="' . tep_output_string($method) . '"';
    if (tep_not_null($parameters)) $form .= ' ' . $parameters;
    $form .= '>';
    
    return $form;
  }
  
/checkout_confirmation.php at line 324 aprox:
Find:
echo tep_image_submit('button_confirm_order.gif', IMAGE_BUTTON_CONFIRM_ORDER) . "\n";

Replace it by:
if ($payment=='paygol')
  echo tep_image_submit_paygol('button_confirm_order.gif', IMAGE_BUTTON_CONFIRM_ORDER) . "\n";
else
    echo tep_image_submit('button_confirm_order.gif', IMAGE_BUTTON_CONFIRM_ORDER) . "\n";


Find:
echo tep_draw_form('checkout_confirmation', $form_action_url, 'post');

Replace it by:
if ($payment=='paygol')
  echo tep_draw_form_paygol('pg_frm', 'post');
else
  echo tep_draw_form('checkout_confirmation', $form_action_url, 'post');


4) Optional: File /includes/modules/payment/paygol.php
You can add a notify url see par "pg_notify_url" which will send you all pars needed after an order is processed



Set up:
===============================================================================
1. Go to administration section of osCommerce 'Modules " -> "Payment"->"PayGol"->"Install'

2. Click 'Edit' and follow the instructions:
	In "Switch on payment by sms and phone call module" switch to True
	
        In "Default order status" select Delivered
        
        In "Your service id at PayGol" enter your service id "pg_serviceid" at PayGol.com


Support
===============================================================================
For further questions, please contact PayGol technical support 
via hide@address.com


















Return current item: osCommerce pay by sms and phone