How to use the Basic Implementation
Parameters description
How to test your service
How to use the basic implementation
The code below is ready to use. Just copy the piece of code into your web page, replace the values with your own and you will be ready to go.
<form name="pg_frm" method="post" action="https://www.paygol.com/pay" > <input type="hidden" name="pg_serviceid" value="123"> <input type="hidden" name="pg_currency" value="EUR"> <input type="hidden" name="pg_name" value="DEMO"> <input type="hidden" name="pg_custom" value=""> <input type="hidden" name="pg_price" value="1"> <input type="hidden" name="pg_return_url" value=""> <input type="hidden" name="pg_cancel_url" value=""> <input type="image" name="pg_button" src="https://www.paygol.com/pay-now/images/payment-button.png" border="0" alt="Make payments with Paygol: the easiest way!" title="Make payments with Paygol: the easiest way!" > </form>
Parameters description
The following POST/GET parameters are required:
Parameter | Description |
pg_serviceid | Service ID of your account. |
pg_currency | Type of currency specified in alphabetic code ISO 4217 you want to use (eg: EUR, USD, GBP, MXN, etc.). See the full list of the currency codes. |
pg_price | The price of your product, you can simply change it. If your customers select other country, currency will be automatically converted. |
pg_name | (Optional) Description of your product/service, which will be shown on the payment screen. |
pg_custom | (Optional) Custom field, can be used to identify customer, inventory, etc. |
pg_return_url | (Optional) After the payment process your customers will be redirected here (e.g. https://www.mysite.com/thanks). |
pg_cancel_url | (Optional) Your customer will be redirected to after a cancelled or failed payment process (e.g. https://www.mysite.com/failed). |
pg_button | This is the payment button image. You can use it or replace it with your own. |
How to test your implementation
On top of your Paygol dashboard you will be able to switch between Live and Test mode. In Test mode you can simulate transactions with no need to spend real money (just click OK on your payment screen and a successful payment will be simulated).
Please note that you don’t need to perform any external actions (such as entering credit card information) in order to test transactions.