<?php

// Llenamos los parametros
$receiver_id = 2;
$subject = 'Impresora Laser';
$body = 'Una impresora laser con multiples bandejas de entrada';
$amount = '100';
$return_url = 'http://misitio.com/exito';
$cancel_url = '';
$transaction_id = 'T-1000';
$payer_email = 'mi.cliente@misitio.com';
$picture_url = '';
$secret = 'e40ac9591200b2ec9277cd1c795af82d618cf78e';
$custom = 'el modelo en color rojo';

$khipu_url = 'https://khipu.com/api/createPaymentPage';

// creamos el hash
$concatenated = "receiver_id=$receiver_id&subject=$subject&body=$body&amount=$amount&return_url=$return_url&cancel_url=$cancel_url&custom=$custom&transaction_id=$transaction_id&picture_url=$picture_url&payer_email=$payer_email&secret=$secret";
$hash = sha1($concatenated);

?>
<form action="<?php echo $khipu_url ?>" method="post">
<input type="hidden" name="receiver_id" value="<?php echo $receiver_id ?>">
<input type="hidden" name="subject" value="<?php echo $subject ?>"/>
<input type="hidden" name="body" value="<?php echo $body ?>">
<input type="hidden" name="amount" value="<?php echo $amount ?>">
<input type="hidden" name="return_url" value="<?php echo $return_url ?>"/>
<input type="hidden" name="cancel_url" value="<?php echo $cancel_url ?>"/>
<input type="hidden" name="custom" value="<?php echo $custom ?>">
<input type="hidden" name="transaction_id" value="<?php echo $transaction_id ?>">
<input type="hidden" name="payer_email" value="<?php echo $payer_email ?>">
<input type="hidden" name="picture_url" value="<?php echo $picture_url ?>">
<input type="hidden" name="hash" value="<?php echo $hash ?>">
<input type="image" name="submit" src="https://s3.amazonaws.com/static.khipu.com/buttons/200x50.png"/>
</form>

Abrir chat
1
Llámanos o escríbenos un mensaje
Hola 👋🏼
¿En que podemos ayudarte?