Files
kulakpos_web/vendor/mercadopago/dx-php/samples/suscriptions/basic-suscription.php
triagungbiantoro 417b7b7453
All checks were successful
Build, Push and Deploy / build-and-push (push) Successful in 3m27s
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 16s
Build, Push and Deploy / deploy-staging (push) Successful in 31s
Build, Push and Deploy / deploy-production (push) Has been skipped
harga pada beranda terhubung ke manage plans di dashboard admin
2026-04-25 21:57:25 +07:00

25 lines
754 B
PHP
Executable File

<?php
require_once dirname(__FILE__) . '/../../index.php';
$preapproval_data = new MercadoPago\Preapproval();
$preapproval_data->payer_email = "your.payer@email.com";
$preapproval_data->back_url = "http://www.my-site.com";
$preapproval_data->reason = "Monthly subscription to premium package";
$preapproval_data->external_reference = "OP-1234";
$preapproval_data->auto_recurring = array(
"frequency" => 1,
"frequency_type" => "months",
"transaction_amount" => 10,
"currency_id" => "XXX", // your currency
"start_date" => date(DATE_ISO8601),
"end_date" => date(DATE_ISO8601, strtotime('+5 years'))
);
$preapproval_data->save();
var_dump($preapproval_data);
?>