ADVERTISEMENT


Breaking News

Recent Posts

Tuesday, December 16, 2014

How to integrate Paga payment gateway

integration paga with phpFirst of All you have to sign-up for Paga ePay and you will get integration script, that will genrate 'Pay with Paga' Buton

Now find the place in your site to put Paga script which will genrate Paga button.

Now you have to Palace html form having hidden fields put on same page where script is placed
1:   <form action="post"> 

2:        <input type="hidden" name="customer_account" value="123"> 

3:        <input type="hidden" name="subtotal[0]" value="200"> 

4:        <input type="hidden" name="description[0]" value="Deposit amount to PlayGame"> 

5:        <input type="hidden" name="test" value="true"> 

6:        <input type="hidden" name="return_url" value="www.yoursite.com/return.php"> 

7:       </form> 

8:   <script type="text/javascript" src="https://www.mypaga.com/paga-web/epay/ePay-button.paga?k=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&e=false"> </script> 


        
In above form below are the further details about parameters:

customer_account  : customer accunt number/id on your site
subtotal[0]               : Amount/Price you can add multiple field, as you see its array
description[0]         : Description of transaction you can add multiple field, as you see its array
test                           : It would be true only incase of testing, otherwise remove this field or set false
return_url               : It will redirect by Paga on your site page where you get response from post

Note about script tag:

- Script should be placed after form ending tag
- above mentioned xxxxxxx would be replace your key

Response 

The response sent to the redirect URL will be an HTTP POST with the following parameters:

Parameter Name :   Description

Status:

SUCCESS
ERROR_TIMEOUT
ERROR_INVALID_CUSTOMER_ACCOUNT
ERROR_CANCELLED
ERROR_BELOW_MINIMUM
ERROR_ABOVE_MAXIMUM
ERROR_AUTHENTICATION
ERROR_OTHER

key :Your public key as included in the script url. 
invoice:The invoice number provided with your form
submission (if provided)
customer_account:The customer account number provided with
your form submission (if provided)
transaction_id: If the transaction was successful,
total: The total transaction amount (calculated as the
sum of a line item subtotal, surcharge, and tax
amounts. 
currency:The foreign currency code provided with the
request (if any)
exchange_rate:The exchange rate that was used by the
platform for converting foreign currency top the
local (system) default equivalent. Only provided
if currency parameter provided 
 test:The test flag as provided with your form
submission
reference:The reference number associated with the
purchase transaction
process_code:The process code uniquely identifying this
transaction.

7 comments:

  1. Doesn't work proper.

    Best results is gotten when a full plugin is provided by the payment platform.
    A snipet of code like this isn't efficient.

    ReplyDelete
  2. @ENUMA can you please tell me the problem which you are facing ?

    ReplyDelete
  3. can we this integrate in Woocomerce ? please advice

    ReplyDelete
    Replies
    1. @soni I am sure we can integrate it can you please share some code so that I can help out you.
      Thanks

      Delete
  4. Hello,

    I need to integrate this paga payment into wordpress custom form.

    Can I integrate?

    I have created one shortcode.

    Its not redirected to payment gatway page. Please advice

    ReplyDelete

Designed By Published.. Blogger Templates