當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。