File: /var/www/vhost/disk-apps/alq-cali.bikenow.co/resources/views/mercadopago/webcheckout.blade.php
<!DOCTYPE html>
<html>
<head>
<title>Mi Integración con Checkout Pro</title>
</head>
<body>
<!-- Contenido de tu página -->
<script src="https://sdk.mercadopago.com/js/v2"></script>
<script>
// Configure sua chave pública do Mercado Pago
const publicKey = "YOUR_PUBLIC_KEY";
// Configure o ID de preferência que você deve receber do seu backend
const preferenceId = "YOUR_PREFERENCE_ID";
// Inicializa o SDK do Mercado Pago
const mp = new MercadoPago(publicKey);
// Cria o botão de pagamento
const bricksBuilder = mp.bricks();
const renderWalletBrick = async (bricksBuilder) => {
await bricksBuilder.create("wallet", "walletBrick_container", {
initialization: {
preferenceId: "<PREFERENCE_ID>",
}
});
};
renderWalletBrick(bricksBuilder);
</script>
</body>
</html>
<html>
<body onload="byPass()">
<form id="formPayment" action="{{ $gateway_data['url'] . '/ppp-web-gateway-payu/' }}" method="post" style="display: none;">
<input type="text" name="merchantId" value="{{ $gateway_data['merchantId'] }}">
<input type="text" name="accountId" value="{{ $gateway_data['accountId'] }}">
<input type="text" name="description" value="{{ $payment['description'] }}">
<input type="text" name="referenceCode" value="{{ $payment['reference'] }}">
<input type="text" name="amount" value="{{ $payment['amount']['total'] }}">
<input type="text" name="tax" value="0">
<input type="text" name="taxReturnBase" value="0">
<input type="text" name="currency" value="{{ $payment['amount']['currency'] }}">
<input type="text" name="signature" value="{{ $signature }}">
<input type="text" name="test" value="{{ !$gateway_data['isProductive'] }}">
<input type="text" name="buyerEmail" value="{{ $buyer['email'] }}">
<input type="text" name="responseUrl" value="{{ $responseUrl }}">
<input type="text" name="confirmationUrl" value="{{ $confirmationUrl }}">
</form>
</body>
<script>
function byPass() {
document.getElementById('formPayment').submit();
}
</script>
</html>