Page MenuHomePhorge

StripeMockClient.php
No OneTemporary

Authored By
Unknown
Size
591 B
Referenced Files
None
Subscribers
None

StripeMockClient.php

<?php
namespace Tests;
use Stripe as StripeAPI;
class StripeMockClient implements StripeAPI\HttpClient\ClientInterface
{
private $responses = [];
public function request($method, $absUrl, $headers, $params, $hasFile)
{
if (empty($this->responses)) {
throw new \Exception("StripeMockClient: Missing response for $absUrl.");
}
$response = array_shift($this->responses);
return $response;
}
public function addResponse($body, $code = 200, $headers = [])
{
$this->responses[] = [$body, $code, $headers];
}
}

File Metadata

Mime Type
text/x-php
Expires
Fri, Apr 24, 1:12 PM (6 d, 12 h ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
18/cd/88ee2ecc7708822a8a3f43c2fdfb
Default Alt Text
StripeMockClient.php (591 B)

Event Timeline