当前位置: 首页>>代码示例>>PHP>>正文


PHP MP::update_preapproval_payment方法代码示例

本文整理汇总了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>
开发者ID:pthreat,项目名称:apf-dev,代码行数:22,代码来源:update_preapproval.php

示例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>
开发者ID:casipe,项目名称:sdk-php,代码行数:22,代码来源:update_preapproval.php


注:本文中的MP::update_preapproval_payment方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。