Moneris Community
Search
User
User
Product Forums
Blogs
Developer Portal
More
Cancel
Product Forums
Moneris Payment Gateway (Formerly…
Hosted Pay Page (Data Preload…
State
Not Answered
Date
AEK2001
Date
17 Feb 2021 7:08 PM
Replies
0 replies
Subscribers
20 subscribers
Views
938 views
data preload
Options
Share
More
Cancel
Related
Hosted Pay Page (Data Preload) response is blank (PHP)
UPDATE:
Not sure if this documented anywhere, but the curl when applied to an existing store (a store existing before Data Preload feature was added) does NOT work. If you create a new store from scratch, the curl does work. It appears that stores existing before the feature do not work, and one would need to create a new one. Can Moneris confirm this behaviour?
Testing the PHP script (over https) below but always getting empty response. When I make a change to the $url I get data back pertaining it failing to connect, and when I change store ID or store KEY, I also get notices pertaining invalid credentials, meaning that it is getting data back.
I am not able to get any response back, no matter what I have tried. Should be straight forward, but nothing is getting back.
running this on the command line:
curl -d "ps_store_id=xxxxx&hpp_key=yyyyy&charge_total=100.00&order_id=12343567&hpp_preload=" -X POST
https://esqa.moneris.com/HPPDP/index.php
also yields nothing
Does one need to enable anything in the admin configuration of the test store?
I looked at the config and read the doc, but I could not see any reference to such.
Tried the same on the prod server, and getting the same results.
I am located in Canada. Thank you.
----------------------------------------------------- PHP TEST CODE BELOW -----------------------------------------------------
<?php
$url = "https://esqa.moneris.com/HPPDP/index.php";
$store_id = "xxxxx";
$hpp_key = "yyyyy";
$charge_total = "100.00";
$dataToSend = "ps_store_id=$store_id&hpp_key=$hpp_key&charge_total=$charge_total&hpp_preload=";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $dataToSend);
curl_setopt($ch, CURLOPT_TIMEOUT, $gArray['CLIENT_TIMEOUT']);
curl_setopt($ch, CURLOPT_USERAGENT, $gArray['API_VERSION']);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
$httpCode = curl_getinfo($ch , CURLINFO_HTTP_CODE);
$response = curl_exec($ch);
echo "Response : " . $response . "<br/>";
?>
Reply