Implementing a New Design of the Payment Gateway

The GoPay payment gateway now enables you to create a payment, using an inline version, which is also available for the previous API versions. The new way of integration provides you with implementing the inline payment gateway to your current version without affecting its stability and availability.

Our tip:
Please, before you start using the inline payment gateway, contact our technical department via e-mail: integrace@gopay.cz, so we can check if your settings is correct.

Implementing a new design of the payment gateway to your current marketplace

The new design of the payment gateway is designed in a way that won’t affect stability and availability of your current payment gateway (the standard version) when implementing. This makes the implementation process of the new design significantly faster and cheaper.

All the functionalities, using the GoPay web service, remain available as usual.

Initializing the new design of the payment gateway

There’s a difference in the integration process. While the previous version requires the redirecting to the GoPay payment gateway, the new inline version doesn’t require that step. The inline payment gateway is initialized by using a javascript library form, encrypted signature and a paymentSessionId of the payment created in advance. The redirect version of the payment gateway uses the same graphic interface as the inline version, except it doesn’t use the javascript library.

Sandbox environment

You can debug your current version of integration to prepare it for a new design - in your sandbox environment.

Example of a form initializing the inline payment gateway in the sandbox environment


<form action="https://gw.sandbox.gopay.com/gw/v3/3100000099" method="post" id="gopay-payment-button"> <input type="hidden" name="signature" value="25ee53a1ec­cc253a8310f5267d2de6b483f58a­f9676d883e26600ce3316ai"/> <button name="pay" type="submit">Zaplatit</button> <script type="text/javascript" src="https://gw.sandbox.gopay.com/gp-gw/js/embed.js"></script> </form>

Example of a form initializing the payment gateway hosted in the sandbox environment:


<form action="https://gw.sandbox.gopay.com/gw/v3/3100000099" method="post" id="gopay-payment-button"> <input type="hidden" name="signature" value="25ee53a1ec­cc253a8310f5267d2de6b483f58a­f9676d883e26600ce3316ai"/> <button name="pay" type="submit">Zaplatit</button> </form>

​Production environment

In your production environment it’s necessary to change the https://gw.sandbox.gopay.com address to this one: https://gate.gopay.cz, using the address of the hosting service plus your GoID and SecureKey. You can get an access to the production environment after performing necessary testing operations and signing the contract.

Example of a form initializing the inline payment gateway in the production environment

<form action="https://gate.gopay.cz/gw/v3/3100000099 method="post" id="gopay-payment-button">
<input type="hidden" name="signature" value="25ee53a1ec­cc253a8310f5267d2de6b483f58a­f9676d883e26600ce3316ai"/>
<button name="pay" type="submit">Zaplatit</button>
<script type="text/javascript" src="https://gate.gopay.cz/gp-gw/js/embed.js"></script>
</form>


Example of a form initializing the payment gateway hosted in the production environment

<form action="https://gate.gopay.cz/gw/v3/3100000099 method="post" id="gopay-payment-button"> <input type="hidden" name="signature" value="25ee53a1ec­cc253a8310f5267d2de6b483f58a­f9676d883e26600ce3316ai"/> <button name="pay" type="submit">Zaplatit</button> </form>
Parameter Description Mandatory Example
paymentSessionId Identifies the payment; you can get it after payment settlement. Add this parameter to the action form next to the payment gateway address Yes 3100000099
signature

payment encrypted signature

Yes

25ee53a1ec­cc253a8310f5267d2de6b483f58a­f9676d883e26600ce3316ai

String for encrypted signature creation

targetGoId+|+pa­ymentSessionId+|+se­cureKey

You can find an example of how to implement an encrypted signature creation in PHP below:

$encryptedSignature = GopayHelper::encrypt( GopayHelper::hash( GopayHelper::concatPaymentCommand($targetGoId, $paymentSessionId, $secureKey) ), $secureKey); 

 

 

 

 

Was this article helpful?:

Are you looking for something else?

Contact support specialist