@@ -39,8 +39,8 @@ |
||
39 | 39 | public static function delete($token, array $params = array()) |
40 | 40 | { |
41 | 41 | throw new Exception\RuntimeException( |
42 | - 'Resource ' . ucfirst(static::RESOURCE_NAME) . |
|
43 | - ' does not support method ' . __METHOD__ |
|
42 | + 'Resource '.ucfirst(static::RESOURCE_NAME). |
|
43 | + ' does not support method '.__METHOD__ |
|
44 | 44 | ); |
45 | 45 | } |
46 | 46 | } |
@@ -20,8 +20,8 @@ |
||
20 | 20 | |
21 | 21 | protected function getResourceUri() |
22 | 22 | { |
23 | - return $this->apiUri . '/sellers' |
|
24 | - . ($this->tokenId ? '/' . $this->tokenId : null) |
|
23 | + return $this->apiUri.'/sellers' |
|
24 | + . ($this->tokenId ? '/'.$this->tokenId : null) |
|
25 | 25 | . '/transfers'; |
26 | 26 | } |
27 | 27 | } |
@@ -20,8 +20,8 @@ |
||
20 | 20 | |
21 | 21 | protected function getResourceUri() |
22 | 22 | { |
23 | - return $this->apiUri . '/payments' |
|
24 | - . ($this->tokenId ? '/' . $this->tokenId : null) |
|
23 | + return $this->apiUri.'/payments' |
|
24 | + . ($this->tokenId ? '/'.$this->tokenId : null) |
|
25 | 25 | . '/transfers'; |
26 | 26 | } |
27 | 27 | } |
@@ -38,7 +38,7 @@ |
||
38 | 38 | return $this->apiUri |
39 | 39 | . '/' |
40 | 40 | . $this->resource |
41 | - . ($this->tokenId ? '/' . $this->tokenId : null); |
|
41 | + . ($this->tokenId ? '/'.$this->tokenId : null); |
|
42 | 42 | } |
43 | 43 | |
44 | 44 | /** |
@@ -26,6 +26,6 @@ |
||
26 | 26 | return $uri; |
27 | 27 | } |
28 | 28 | |
29 | - return $uri . '/balance/'; |
|
29 | + return $uri.'/balance/'; |
|
30 | 30 | } |
31 | 31 | } |
@@ -25,8 +25,8 @@ discard block |
||
25 | 25 | public static function update($token, array $params) |
26 | 26 | { |
27 | 27 | throw new Exception\RuntimeException( |
28 | - 'Resource ' . ucfirst(static::RESOURCE_NAME) . |
|
29 | - ' does not support method ' . __METHOD__ |
|
28 | + 'Resource '.ucfirst(static::RESOURCE_NAME). |
|
29 | + ' does not support method '.__METHOD__ |
|
30 | 30 | ); |
31 | 31 | } |
32 | 32 | |
@@ -38,8 +38,8 @@ discard block |
||
38 | 38 | public static function delete($token, array $params = array()) |
39 | 39 | { |
40 | 40 | throw new Exception\RuntimeException( |
41 | - 'Resource ' . ucfirst(static::RESOURCE_NAME) . |
|
42 | - ' does not support method ' . __METHOD__ |
|
41 | + 'Resource '.ucfirst(static::RESOURCE_NAME). |
|
42 | + ' does not support method '.__METHOD__ |
|
43 | 43 | ); |
44 | 44 | } |
45 | 45 | } |
@@ -12,11 +12,11 @@ discard block |
||
12 | 12 | // create a new seller |
13 | 13 | $seller = Seller::create($sellerParams); |
14 | 14 | $sellerToken = $seller->token; |
15 | - echo 'Seller with token ' . $sellerToken . ' created' . PHP_EOL; |
|
15 | + echo 'Seller with token '.$sellerToken.' created'.PHP_EOL; |
|
16 | 16 | |
17 | 17 | // create a new payment with split=1 flag |
18 | 18 | $payment = Payment::create($paymentParams); |
19 | - echo 'Payment successfully created' . PHP_EOL; |
|
19 | + echo 'Payment successfully created'.PHP_EOL; |
|
20 | 20 | |
21 | 21 | $params = array( |
22 | 22 | 'seller' => $sellerToken, |
@@ -28,13 +28,13 @@ discard block |
||
28 | 28 | |
29 | 29 | // transfer payment amount to seller |
30 | 30 | $transfer = Transfer::payment($payment->token, $params); |
31 | - echo 'Successfully transferred ' . $transfer->amount . ' cents to seller' . PHP_EOL; |
|
31 | + echo 'Successfully transferred '.$transfer->amount.' cents to seller'.PHP_EOL; |
|
32 | 32 | |
33 | 33 | $transfer = Transfer::retrieve($transfer->token); |
34 | 34 | |
35 | 35 | // update transfer |
36 | 36 | $transfer = Transfer::update($transfer->token, array('on_hold' => '0')); |
37 | - echo 'Successfully updated on_hold property' . PHP_EOL; |
|
37 | + echo 'Successfully updated on_hold property'.PHP_EOL; |
|
38 | 38 | |
39 | 39 | $params = [ |
40 | 40 | 'type' => 'debit', |
@@ -43,20 +43,20 @@ discard block |
||
43 | 43 | ]; |
44 | 44 | |
45 | 45 | $direct = Transfer::direct($sellerToken, $params); |
46 | - echo 'Successfully debited seller account with ' . $direct->amount . ' cents' . PHP_EOL; |
|
46 | + echo 'Successfully debited seller account with '.$direct->amount.' cents'.PHP_EOL; |
|
47 | 47 | |
48 | 48 | // list all transfers |
49 | 49 | $transfers = Transfer::listAll(); |
50 | - echo 'Total count of transfers: ' . $transfers->total_count . PHP_EOL; |
|
50 | + echo 'Total count of transfers: '.$transfers->total_count.PHP_EOL; |
|
51 | 51 | |
52 | 52 | // retrieve seller's balance |
53 | 53 | $balance = Seller::balance($sellerToken); |
54 | - echo 'Available seller balance: ' . $balance->available_amount . PHP_EOL; |
|
54 | + echo 'Available seller balance: '.$balance->available_amount.PHP_EOL; |
|
55 | 55 | |
56 | 56 | $marketplaceBalance = Balance::balance(); |
57 | - echo 'Marketplace available balance: ' . $marketplaceBalance->marketplace->available_amount . PHP_EOL; |
|
58 | - echo 'Marketplace current balance: ' . $marketplaceBalance->marketplace->current_amount . PHP_EOL; |
|
57 | + echo 'Marketplace available balance: '.$marketplaceBalance->marketplace->available_amount.PHP_EOL; |
|
58 | + echo 'Marketplace current balance: '.$marketplaceBalance->marketplace->current_amount.PHP_EOL; |
|
59 | 59 | |
60 | 60 | } catch (ApiErrorException $e) { |
61 | - echo $e->getMessage() . PHP_EOL; |
|
61 | + echo $e->getMessage().PHP_EOL; |
|
62 | 62 | } |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -require_once __DIR__ . '/../vendor/autoload.php'; |
|
3 | +require_once __DIR__.'/../vendor/autoload.php'; |
|
4 | 4 | |
5 | 5 | use Everypay\Everypay; |
6 | 6 |
@@ -9,7 +9,7 @@ discard block |
||
9 | 9 | // create a new seller |
10 | 10 | $seller = Seller::create($sellerParams); |
11 | 11 | $sellerToken = $seller->token; |
12 | - echo 'Seller with token ' . $sellerToken . ' created' . PHP_EOL; |
|
12 | + echo 'Seller with token '.$sellerToken.' created'.PHP_EOL; |
|
13 | 13 | |
14 | 14 | // retrieve seller's details |
15 | 15 | $seller = Seller::retrieve($sellerToken); |
@@ -17,15 +17,15 @@ discard block |
||
17 | 17 | |
18 | 18 | // update seller's email address |
19 | 19 | $seller = Seller::update($sellerToken, ['email' => '[email protected]']); |
20 | - echo 'Successfully updated seller' . PHP_EOL; |
|
20 | + echo 'Successfully updated seller'.PHP_EOL; |
|
21 | 21 | |
22 | 22 | // list sellers and return last two |
23 | 23 | $sellers = Seller::listAll(); |
24 | - echo 'Total count of sellers: ' . $sellers->total_count . PHP_EOL; |
|
24 | + echo 'Total count of sellers: '.$sellers->total_count.PHP_EOL; |
|
25 | 25 | |
26 | 26 | // retrieve seller's balance |
27 | 27 | $balance = Seller::balance($sellerToken); |
28 | - echo 'Available seller balance: ' . $balance->available_amount . PHP_EOL; |
|
28 | + echo 'Available seller balance: '.$balance->available_amount.PHP_EOL; |
|
29 | 29 | } catch (ApiErrorException $e) { |
30 | - echo $e->getMessage() . PHP_EOL; |
|
30 | + echo $e->getMessage().PHP_EOL; |
|
31 | 31 | } |