Hej
Jeg er igang med at tilføj noget betaling system på hjemmesiden men jeg er kommet ind i problemer, vil derfor høre om du kunne hjælpe mig med at løse problemet.
Jeg er kommet her til:
https://helpdesk.quickpay.net/hc/da/articles/203318933--Hvordan-udregnes-variablen-md5check-der-sendes-til-callbackurl- Hvergang at jeg arbejde på den del så for jeg problemer som her:
Message Error Detected
An unrecoverable message error has been detected with the following information:
Integrity test failed!
Your md5check: 29p61DveBZ79c3144LW61lVz1qrwk2gfAFCxPyi5sn49m3Y3IRK5M6SN5d8a68u7
The md5check ensures data integrity. Please refer to your merchant documentation for more information
Please correct the problem and re-submit.
Min kode ser sådan her ud:
- $sql = "SELECT pakker.pris FROM pakker WHERE pakker.id = 3";
- if ($stmt = $this->mysqli->prepare($sql)) {
- $stmt->execute();
- $stmt->bind_result($pris);
- while ($stmt->fetch()) {
- $protocol = '7';
- $msgtype = 'authorize';
- $merchant = '89898978';
- $language = 'da';
- $ordernumber = 1234;
- $amount = $pris;
- $currency = 'DKK';
- $continueurl='http://yourdomain.dk/continueurl.php';
- $cancelurl='http://yourdomain.dk/cancelurl.php';
- $callbackurl='http://yourdomain.dk/callbackurl.php';
- $secret = 'Y3E3a8nb3D82mqQKF6ZA89yr4t2hC2c7JXij211576sPNI36wT58f5kL7S9pl1HR';
-
- $md5check = md5($protocol . $msgtype . $merchant . $language . $ordernumber . $amount . $currency . $continueurl . $cancelurl . $callbackurl . $autocapture . $cardtypelock . $secret)
- ?>
- <form action="https://secure.quickpay.dk/form/" method="post">
- <input type="hidden" name="protocol" value="<?php echo $protocol;?>" />
- <input type="hidden" name="msgtype" value="<?php echo $msgtype;?>" />
- <input type="hidden" name="merchant" value="<?php echo $merchant;?>" />
- <input type="hidden" name="language" value="<?php echo $language;?>" />
- <input type="hidden" name="ordernumber" value="<?php echo $ordernumber;?>" />
- <input type="hidden" name="amount" value="<?php echo $amount;?>" />
- <input type="hidden" name="currency" value="<?php echo $currency;?>" />
- <input type="hidden" name="continueurl" value="<?php echo $continueurl;?>" />
- <input type="hidden" name="cancelurl" value="<?php echo $cancelurl;?>" />
- <input type="hidden" name="callbackurl" value="<?php echo $callbackurl;?>" />
- <input type="hidden" name="md5check" value="<?php echo $secret;?>" />
- <input type="submit" name="kob" value="Betal" class="btn pi-btn-base pi-btn-wide pi-weight-600">
- </form>
- <?php
- }
- $stmt->close();
- } else {
- echo 'Der opstod en fejl i erklæringen: ' . $this->mysqli->error;
- }
Hvad går der galt?