allow vendord
All checks were successful
Build, Push and Deploy / build-and-push (push) Successful in 3m3s
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 16s
Build, Push and Deploy / deploy-staging (push) Successful in 32s
Build, Push and Deploy / deploy-production (push) Has been skipped
Build, Push and Deploy / cleanup (push) Successful in 1s
All checks were successful
Build, Push and Deploy / build-and-push (push) Successful in 3m3s
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 16s
Build, Push and Deploy / deploy-staging (push) Successful in 32s
Build, Push and Deploy / deploy-production (push) Has been skipped
Build, Push and Deploy / cleanup (push) Successful in 1s
This commit is contained in:
25
vendor/mercadopago/dx-php/samples/checkout-buttons/basic-preference/button.php
vendored
Normal file
25
vendor/mercadopago/dx-php/samples/checkout-buttons/basic-preference/button.php
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
# Crear un boton de pago a partir de una preferencia con atributos requeridos minimos
|
||||
|
||||
require_once dirname(__FILE__).'/../../index.php';
|
||||
|
||||
$preference = new MercadoPago\Preference();
|
||||
|
||||
# Building an item
|
||||
|
||||
$item = new MercadoPago\Item();
|
||||
$item->id = "00001";
|
||||
$item->title = "item";
|
||||
$item->quantity = 1;
|
||||
$item->unit_price = 100;
|
||||
|
||||
$preference->items = array($item);
|
||||
|
||||
$preference->save(); # Save the preference and send the HTTP Request to create
|
||||
|
||||
# Return the HTML code for button
|
||||
|
||||
echo "<a href='$preference->sandbox_init_point'> Pagar </a>";
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user