Visualizzazione dei risultati da 1 a 2 su 2
  1. #1
    Utente di HTML.it
    Registrato dal
    Jan 2002
    Messaggi
    45

    Pagamento con Cellulare

    Cari Tutti,
    ho trovato su Internet un sistema di pagamento chiamato DAOPAY per maggiori info www.daopay.com ma nn riesco ad implementarlo

    ho inviato una email ma ancora nn ho ricevuto alcuna informazione ...

    quello che volevo dire è che per ogni prodotto che vendo nel sito è associato un pincode.
    Un cliente sul mio sito compra un piccolo file e sucessivamente ricevo una chiamata dal loro server che controllano il pin ad esso associato ...

    https://daopay.com/svc/pay.svc?pin=6...yg&subkey=pdf1

    se il pincode è giusto si dovrebbe scaricare il file zip altrimento compare errore sul browser

    ecco lo script php che dovrebbe aiutarmi ma nulla da fare ...



    <?php

    $prd = $_GET["subkey"];
    $pin = $_GET["pin"];

    $err = "";

    if ($prd && $prd != "" && $pin && $pin != "") {
    $handle = @fopen("http://www.daopay.com/svc/pincheck?appcode=890789&subkey=".$prd."&pin=".$pin , "r");
    if ($handle) {
    $reply = fgets($handle);
    if (substr($reply,0,2) == "ok") {
    $file = "/home/uioy.it/html/www/daopay/".$prd.".zip"; // serve the file
    $resource = fopen($file, "rb");
    if ($resource) {
    header( "Content-type: "."text/html\nContent-length: ".
    (string)(filesize($file)) );
    fpassthru($resource);
    exit;
    }
    else {
    echo "An error occurred: could not open resource";
    exit;
    }
    }
    else {
    $err = "The pin code you entered is not valid!";
    }
    }
    else {
    $err = "Could not validate the pin code";
    }
    }
    ?>

    ALLA FINE LA PAGINA DEL BROWSER RIMANE COMPLETAMENTE BIANCA INVECE DI SCARICARE IL FILE

    nn riesco a capire come risolvere il problema forse sono troppo stanco,

    grazie cmq,
    C.
    _^!^_

  2. #2
    Codice PHP:
    <?php

    $prd 
    $_GET["subkey"];
    $pin $_GET["pin"];

    $err "";

    if (
    $prd != "" && $pin != "") {
    $handle = @fopen("http://www.daopay.com/svc/pincheck?appcode=890789&subkey=".$prd."&pin=".$pin"r");
    if (
    $handle) {
    $reply fgets($handle);
    if (
    substr($reply,0,2) == "ok") {
    $file "/home/uioy.it/html/www/daopay/".$prd.".zip"// serve the file
    $resource fopen($file"rb");
    if (
    $resource) {
    header"Content-type: "."text/html\nContent-length: ".
    (string)(
    filesize($file)) );
    fpassthru($resource);
    exit;
    }
    else {
    echo 
    "An error occurred: could not open resource";
    exit;
    }
    }
    else {
    $err "The pin code you entered is not valid!";
    }
    }
    else {
    $err "Could not validate the pin code";
    }
    }
    ?>
    ti ho modificato un pò lo script..prova se va!

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.