本文整理汇总了PHP中MP::update_preapproval_payment方法的典型用法代码示例。如果您正苦于以下问题:PHP MP::update_preapproval_payment方法的具体用法?PHP MP::update_preapproval_payment怎么用?PHP MP::update_preapproval_payment使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MP
的用法示例。
在下文中一共展示了MP::update_preapproval_payment方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: MP
<?php
require_once "lib/mercadopago.php";
$mp = new MP("CLIENT_ID", "CLIENT_SECRET");
$id = "PREAPPROVAL_ID";
$preapprovalPayment = array("payer_email" => "my_customer@my_site.com", "back_url" => "http://www.example.com.ar", "reason" => "Suscripción mensual", "external_reference" => "OP-1234", "frequency" => 1, "frequency_type" => "months", "transaction_amount" => 60, "currency_id" => "ARS", "start_date" => "2013-10-10T14:58:11.778-03:00", "end_date" => "2013-12-10T14:58:11.778-03:00");
$preapprovalPaymentResult = $mp->update_preapproval_payment($id, $preapprovalPayment);
?>
<!doctype html>
<html>
<head>
<title>MercadoPago SDK - Create Preapproval Payment and Show Subscription Example</title>
</head>
<body>
<a href="<?php
echo $preapprovalPaymentResult["response"]["init_point"];
?>
" name="MP-Checkout" class="orange-ar-m-sq-arall">Pay</a>
<script type="text/javascript" src="http://mp-tools.mlstatic.com/buttons/render.js"></script>
</body>
</html>
示例2: MP
<?php
require_once "../../lib/mercadopago.php";
$mp = new MP("CLIENT_ID", "CLIENT_SECRET");
$id = "PREAPPROVAL_ID";
$preapprovalPayment_data = array("payer_email" => "my_customer@my_site.com", "back_url" => "http://www.example.com.ar", "reason" => "Suscripción mensual", "external_reference" => "OP-1234", "frequency" => 1, "frequency_type" => "months", "transaction_amount" => 60, "currency_id" => "ARS", "start_date" => "2013-10-10T14:58:11.778-03:00", "end_date" => "2013-12-10T14:58:11.778-03:00");
$preapprovalPayment = $mp->update_preapproval_payment($id, $preapprovalPayment_data);
?>
<!doctype html>
<html>
<head>
<title>MercadoPago SDK - Create Preapproval Payment and Show Subscription Example</title>
</head>
<body>
<a href="<?php
echo $preapprovalPayment["response"]["init_point"];
?>
" name="MP-Checkout" class="orange-ar-m-sq-arall">Pay</a>
<script type="text/javascript" src="http://mp-tools.mlstatic.com/buttons/render.js"></script>
</body>
</html>