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


PHP Payment::all方法代码示例

本文整理汇总了PHP中PayPal\Api\Payment::all方法的典型用法代码示例。如果您正苦于以下问题:PHP Payment::all方法的具体用法?PHP Payment::all怎么用?PHP Payment::all使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在PayPal\Api\Payment的用法示例。


在下文中一共展示了Payment::all方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getList

 public function getList($count = 10, $index = 0)
 {
     $apiContext = $this->connectionService->getApiContext();
     $dispatcher = $this->connectionService->getDispatcher();
     $dispatcher->dispatch(PaymentEvent::GET_ALL_START);
     $params = array('count' => $count, 'start_index' => $index);
     $payments = Payment::all($params, $apiContext);
     $dispatcher->dispatch(PaymentEvent::GET_ALL_END);
     return $payments->getPayments();
 }
开发者ID:DDFranky22,项目名称:DDFPayPalBundle,代码行数:10,代码来源:PaymentService.php

示例2: testOperations

 public function testOperations()
 {
     $p1 = $this->payments['new'];
     $p1->create();
     $this->assertNotNull($p1->getId());
     $p2 = Payment::get($p1->getId());
     $this->assertNotNull($p2);
     $paymentHistory = Payment::all(array('count' => '10'));
     $this->assertNotNull($paymentHistory);
 }
开发者ID:Lucerin,项目名称:Yii-projects,代码行数:10,代码来源:PaymentTest.php

示例3: all

 public static function all($param, $apiContext = null)
 {
     if (isset($apiContext)) {
         return Payment::all($param, $apiContext);
     }
     return Payment::all($param);
 }
开发者ID:elijan,项目名称:payments,代码行数:7,代码来源:PaypalPayment.php

示例4: catch

// you've created using the Payments API.
// Note various query parameters that you can
// use to filter, and paginate through the
// payments list.
// API used: GET /v1/payments/payments
require __DIR__ . '/../bootstrap.php';
use PayPal\Api\Payment;
// ### Retrieve payment
// Retrieve the PaymentHistory object by calling the
// static `get` method on the Payment class,
// and pass a Map object that contains
// query parameters for paginations and filtering.
// Refer the method doc for valid values for keys
// (See bootstrap.php for more on `ApiContext`)
try {
    $payments = Payment::all(array('count' => 10, 'start_index' => 5), $apiContext);
} catch (PayPal\Exception\PPConnectionException $ex) {
    echo "Exception:" . $ex->getMessage() . PHP_EOL;
    var_dump($ex->getData());
    exit(1);
}
?>
<html>
<head>
	<title>Lookup payment history</title>
</head>
<body>
	<div>Got <?php 
echo $payments->getCount();
?>
 matching payments </div>
开发者ID:ewwgit,项目名称:eptri,代码行数:31,代码来源:ListPayments.php

示例5: array

<?php

// #GetPaymentList
// This sample code demonstrate how you can
// retrieve a list of all Payment resources
// you've created using the Payments API.
// Note various query parameters that you can
// use to filter, and paginate through the
// payments list.
// API used: GET /v1/payments/payments
require 'CreatePayment.php';
use PayPal\Api\Payment;
// ### Retrieve payment
// Retrieve the PaymentHistory object by calling the
// static `get` method on the Payment class,
// and pass a Map object that contains
// query parameters for paginations and filtering.
// Refer the method doc for valid values for keys
// (See bootstrap.php for more on `ApiContext`)
try {
    $params = array('count' => 10, 'start_index' => 5);
    $payments = Payment::all($params, $apiContext);
} catch (Exception $ex) {
    ResultPrinter::printError("List Payments", "Payment", null, $params, $ex);
    exit(1);
}
ResultPrinter::printResult("List Payments", "Payment", null, $params, $payments);
开发者ID:maherelgamil,项目名称:Small-store-for-books-with-Laravel-5.1,代码行数:27,代码来源:ListPayments.php

示例6: testList

 /**
  * @dataProvider mockProvider
  * @param Payment $obj
  */
 public function testList($obj, $mockApiContext)
 {
     $mockPPRestCall = $this->getMockBuilder('\\PayPal\\Transport\\PayPalRestCall')->disableOriginalConstructor()->getMock();
     $mockPPRestCall->expects($this->any())->method('execute')->will($this->returnValue(PaymentHistoryTest::getJson()));
     $params = array();
     $result = $obj->all($params, $mockApiContext, $mockPPRestCall);
     $this->assertNotNull($result);
 }
开发者ID:Roc4rdho,项目名称:app,代码行数:12,代码来源:PaymentTest.php

示例7: getPaymentList

 /**
  * Get payment list
  *
  * @param int $limit Limit number payment
  * @param int $offset Start index payment
  * @return mixed Object payment list
  */
 public function getPaymentList($limit = 10, $offset = 0)
 {
     $params = ['count' => $limit, 'start_index' => $offset];
     try {
         $payments = Payment::all($params, $this->apiContext);
     } catch (\PayPal\Exception\PPConnectionException $paypalException) {
         throw new \Exception($paypalException->getMessage());
     }
     return $payments;
 }
开发者ID:namnv609,项目名称:laravel5-services,代码行数:17,代码来源:PayPalService.php

示例8: catch

require __DIR__ . '/../bootstrap.php';
use PayPal\Api\Payment;
// ### Authentication
// Pass in a `OAuthTokenCredential` object
// explicilty to authenticate the call.
// If you skip this step, the client id/secret
// set in the config file will be used.
Payment::setCredential($cred);
// ### Retrieve payment
// Retrieve the PaymentHistory object by calling the
// static `get` method on the Payment class,
// and pass a Map object that contains
// query parameters for paginations and filtering.
// Refer the method doc for valid values for keys
try {
    $payments = Payment::all(array('count' => 10, 'start_index' => 5));
} catch (\PPConnectionException $ex) {
    echo "Exception:" . $ex->getMessage() . PHP_EOL;
    var_dump($ex->getData());
    exit(1);
}
?>
<html>
<body>
	<div>Got <?php 
echo $payments->getCount();
?>
 matching payments </div>
	<pre><?php 
var_dump($payments->toArray());
?>
开发者ID:mayoalexander,项目名称:fl-two,代码行数:31,代码来源:ListPayments.php

示例9: array

 function get_payments($count, $offset)
 {
     // auth
     $apiContext = $this->apiContext();
     $params = array('count' => $count, 'start_index' => $offset);
     try {
         // Get the payment Object by passing paymentId
         $PaymentHistory = Payment::all($params, $apiContext);
         $valid = true;
     } catch (Exception $ex) {
         $this->LoggingManager->log(print_r($ex, true), 'DEBUG');
         $valid = false;
     }
     $payment_array = array();
     if ($valid === true) {
         $payments = $PaymentHistory->getPayments();
         for ($p = 0, $x = count($payments); $p < $x; $p++) {
             $payment_array[$p] = $this->get_payment_details($payments[$p], true);
         }
     }
     return $payment_array;
 }
开发者ID:shophelfer,项目名称:shophelfer.com-shop,代码行数:22,代码来源:PayPalInfo.php


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