Forum breadcrumbs - You are here:ForumForum: Feature RequestsHotPay payment module
Login or register to post.

HotPay payment module

Hello,

First of all I'd like to thank to rayn for awesome script, which works so goood! THANK YOU SO MUCH!
I have a question, is it possible that you can create or help me to understand how to create HotPay payment module ?
Purecode:

<form id="order" action="https://platnosc.hotpay.pl/" method="post">
<input required name="SEKRET" value="NFNKYXpWT0xQV3pUYlA5cUhCYi9uY0MxVWpLckEyZnRUN3MrbEcwR1BQcz0," type="hidden">
<input required name="KWOTA" value="1" type="hidden">
<input required name="NAZWA_USLUGI" value="XXX" type="hidden">
<input required name="ADRES_WWW" value="XXX" type="hidden">
<input required name="ID_ZAMOWIENIA" value="XXX" type="hidden">
<input name="EMAIL" value="" type="hidden">
<input name="DANE_OSOBOWE" value="" type="hidden">
<button type="submit">DALEJ</button>
</form>     


and receiver:

<?php
/*
$_POST["KWOTA"] - wartość płatności
$_POST["ID_PLATNOSCI"] - unikalne id płatności
$_POST["ID_ZAMOWIENIA"] - id zamówienia podane podczas inicjacji
$_POST["STATUS"] - FAILURE / SUCCESS / PENDING
$_POST["SEKRET"] - sekret danej usługi
$_POST["HASH"] - hash funkcji skrótu sha256, składającej się z hash("sha256","HASLOZUSTAWIEN;".$_POST["KWOTA"].";".$_POST["ID_PLATNOSCI"].";".$_POST["ID_ZAMOWIENIA"].";".$_POST["STATUS"].";".$_POST["SEKRET"])
*/
if(!empty($_POST["KWOTA"]) &&
!empty($_POST["ID_PLATNOSCI"]) &&
!empty($_POST["ID_ZAMOWIENIA"]) &&
!empty($_POST["STATUS"]) &&
!empty($_POST["SEKRET"]) &&
!empty($_POST["HASH"])
){
if(hash("sha256",";".$_POST["KWOTA"].";".$_POST["ID_PLATNOSCI"].";".$_POST["ID_ZAMOWIENIA"].";".$_POST["STATUS"].";".$_POST["SEKRET"]) == $_POST["HASH"]){
//komunikacja poprawna
if($_POST["STATUS"]=="SUCCESS"){
//płatność zaakceptowana

}else if($_POST["STATUS"]=="FAILURE"){
//odrzucone
}
}

}

Thank You for your help!
https://hotpay.pl/documentation_v3/tech_paybylink.pdf

 

Hi there,

I'm not sure how much help I can be since the documentation isn't in English which unfortunately is pretty much the only language I know, although I do know a really small bit of french.

Basically though, you would have to copy one of the existing payment modules to a new one and replace the code and variables in the right spots and adjust it to work with that payment provider. Maybe PayPal, LiqPay, or CoinPayments would be good starting points although the last 2 use external libraries as well. It's not super simple to do and can take a number of hours to get it all working smoothly. Most providers have some sort of test or sandbox system you can use to test with and make sure it works properly. But first you would just have to update all the code which could be difficult if you don't have any coding experience, or maybe not so difficult if you do.

If you have any questions along the way I can try to help when I get a chance. I don't have any plans to add any additional payment modules to MDS 2.1 and in MDS 3.0 it will use WooCommerce so any payment providers that integrate with that should work but that version isn't ready yet. I'm fairly busy right now with clients and whatnot but if you would like me to do it for you I do charge $40/hour (Canadian Dollars) for custom development services so if you would like that feel free to contact me using the contact form.

Ryan