Her er koden opdater en lille del:
- $protocol = '7';
- $msgtype = 'authorize';
- $merchant = '89898978';
- $language = 'da';
- $ordernumber = "1234";
- $amount = $pris;
- $currency = 'DKK';
- $continueurl='/betal-bruger-godkendt/';
- $cancelurl='/bruger-betal-error/';
- $callbackurl='/betal-bruger-callback/';
- $secret = 'bc6d35f13a95ef15ea201243805d1c27';
-
- $md5check = md5($protocol.$msgtype.$merchant.$language.$ordernumber.$amount.$currency.$continueurl.$cancelurl.$callbackurl.$autocapture.$cardtypelock.$secret)
Nu kommer den frem og fortæller mig det her:
"Error in field: continueurl, Error in field: cancelurl, Error in field: callbackurl"
- $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='www.ordklar.dk/betal-bruger-godkendt/';
- $cancelurl='www.ordklar.dk/bruger-betal-error/';
- $callbackurl='www.ordklar.dk/betal-bruger-callback/';
- $secret = 'xxxxx';
-
- $md5check = md5($protocol.$msgtype.$merchant.$language.$ordernumber.$amount.$currency.$continueurl.$cancelurl.$callbackurl.$autocapture.$cardtypelock.$secret)
- ?>
- <form action="https://secure.quickpay.dk/form/" name="quickpay" 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 $md5check;?>" />
- <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;
- }
Indlæg senest redigeret d. 04.10.2014 20:27 af Bruger #17136