當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Paypal::button方法代碼示例

本文整理匯總了PHP中Paypal::button方法的典型用法代碼示例。如果您正苦於以下問題:PHP Paypal::button方法的具體用法?PHP Paypal::button怎麽用?PHP Paypal::button使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Paypal的用法示例。


在下文中一共展示了Paypal::button方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: wallet_button

     if (isset($wallet['formatted_amount']) && $wallet['formatted_amount'] >= $category_fee) {
         wallet_button($category_fee, sprintf(__("Premium fee for item %d at %s", "paypal"), $item['pk_i_id'], osc_page_title()), "201x" . $item['fk_i_category_id'] . "x" . $item['pk_i_id'], array('user' => $item['fk_i_user_id'], 'itemid' => $item['pk_i_id'], 'email' => $item['s_contact_email']));
     } else {
         if (osc_get_preference('paypal_enabled', 'payment')) {
             Paypal::button($category_fee, sprintf(__("Premium fee for item %d at %s", "paypal"), $item['pk_i_id'], osc_page_title()), "201x" . $item['fk_i_category_id'] . "x" . $item['pk_i_id'], array('user' => $item['fk_i_user_id'], 'itemid' => $item['pk_i_id'], 'email' => $item['s_contact_email']));
         }
         if (osc_get_preference('blockchain_enabled', 'payment')) {
             Blockchain::button($category_fee, sprintf(__("Premium fee for item %d at %s", "paypal"), $item['pk_i_id'], osc_page_title()), "201x" . $item['fk_i_category_id'] . "x" . $item['pk_i_id'], array('user' => $item['fk_i_user_id'], 'itemid' => $item['pk_i_id'], 'email' => $item['s_contact_email']));
         }
         if (osc_get_preference('braintree_enabled', 'payment')) {
             BraintreePayment::button($category_fee, sprintf(__("Premium fee for item %d at %s", "paypal"), $item['pk_i_id'], osc_page_title()), "201x" . $item['fk_i_category_id'] . "x" . $item['pk_i_id'], array('user' => $item['fk_i_user_id'], 'itemid' => $item['pk_i_id'], 'email' => $item['s_contact_email']));
         }
     }
 } else {
     if (osc_get_preference('paypal_enabled', 'payment')) {
         Paypal::button($category_fee, sprintf(__("Premium fee for item %d at %s", "paypal"), $item['pk_i_id'], osc_page_title()), "201x" . $item['fk_i_category_id'] . "x" . $item['pk_i_id'], array('user' => $item['fk_i_user_id'], 'itemid' => $item['pk_i_id'], 'email' => $item['s_contact_email']));
     }
     if (osc_get_preference('blockchain_enabled', 'payment')) {
         Blockchain::button($category_fee, sprintf(__("Premium fee for item %d at %s", "paypal"), $item['pk_i_id'], osc_page_title()), "201x" . $item['fk_i_category_id'] . "x" . $item['pk_i_id'], array('user' => $item['fk_i_user_id'], 'itemid' => $item['pk_i_id'], 'email' => $item['s_contact_email']));
     }
     if (osc_get_preference('braintree_enabled', 'payment')) {
         BraintreePayment::button($category_fee, sprintf(__("Premium fee for item %d at %s", "paypal"), $item['pk_i_id'], osc_page_title()), "201x" . $item['fk_i_category_id'] . "x" . $item['pk_i_id'], array('user' => $item['fk_i_user_id'], 'itemid' => $item['pk_i_id'], 'email' => $item['s_contact_email']));
     }
 }
 ?>
     </div>
     <div style="clear:both;"></div>
     <div name="result_div" id="result_div"></div>
     <script type="text/javascript">
         var rd = document.getElementById("result_div");
     </script>
開發者ID:syedfiraat4,項目名稱:bikade.com,代碼行數:31,代碼來源:makepremium.php

示例2: payment_buttons

function payment_buttons($amount = '0.00', $description = '', $itemnumber = '101', $extra_array = null)
{
    if (osc_get_preference('paypal_enabled', 'payment') == 1) {
        Paypal::button($amount, $description, $itemnumber, $extra_array);
    }
    if (osc_get_preference('blockchain_enabled', 'payment') == 1) {
        Blockchain::button($amount, $description, $itemnumber, $extra_array);
    }
    if (osc_get_preference('braintree_enabled', 'payment') == 1) {
        BraintreePayment::button($amount, $description, $itemnumber, $extra_array);
    }
    if (osc_get_preference('stripe_enabled', 'payment') == 1) {
        StripePayment::button($amount, $description, $itemnumber, $extra_array);
    }
    if (osc_get_preference('coinjar_enabled', 'payment') == 1) {
        CoinjarPayment::button($amount, $description, $itemnumber, $extra_array);
    }
}
開發者ID:virsoni,項目名稱:plugin-payment,代碼行數:18,代碼來源:functions.php

示例3: sprintf

    echo sprintf(__('Credit pack #%d', 'payment'), $pack_n);
    ?>
</h3>
        <div><label><?php 
    _e("Price", "payment");
    ?>
:</label> <?php 
    echo $pack . " " . osc_get_preference('currency', 'payment');
    ?>
</div>
        <?php 
    if (osc_get_preference('paypal_enabled', 'payment') == 1) {
        ?>
            <div>
                <?php 
        Paypal::button($pack, sprintf(__("Credit for %s %s at %s", "payment"), $pack, osc_get_preference("currency", "payment"), osc_page_title()), '301x' . $pack, array('user' => @$user['pk_i_id'], 'itemid' => @$user['pk_i_id'], 'email' => @$user['s_email']));
        ?>
            </div>
        <?php 
    }
    if (osc_get_preference('blockchain_enabled', 'payment') == 1) {
        ?>
            <div>
                <?php 
        Blockchain::button($pack, sprintf(__("Credit for %s %s at %s", "payment"), $pack, osc_get_preference("currency", "payment"), osc_page_title()), '301x' . $pack, array('user' => @$user['pk_i_id'], 'itemid' => @$user['pk_i_id'], 'email' => @$user['s_email']));
        ?>
           </div>
        <?php 
    }
    if (osc_get_preference('braintree_enabled', 'payment') == 1) {
        ?>
開發者ID:syedfiraat4,項目名稱:bikade.com,代碼行數:31,代碼來源:pack.php


注:本文中的Paypal::button方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。