mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-08 17:14:31 -04:00
v5.10.9
This commit is contained in:
parent
f9e631d37d
commit
90c700a81a
@ -1 +1 @@
|
|||||||
5.10.8
|
5.10.9
|
@ -65,7 +65,7 @@ class UpdateCompanyRequest extends Request
|
|||||||
$rules['smtp_local_domain'] = 'sometimes|string|nullable';
|
$rules['smtp_local_domain'] = 'sometimes|string|nullable';
|
||||||
// $rules['smtp_verify_peer'] = 'sometimes|string';
|
// $rules['smtp_verify_peer'] = 'sometimes|string';
|
||||||
|
|
||||||
$rules['e_invoice'] = ['sometimes','nullable', new ValidCompanyScheme()];
|
// $rules['e_invoice'] = ['sometimes','nullable', new ValidCompanyScheme()];
|
||||||
|
|
||||||
if (isset($input['portal_mode']) && ($input['portal_mode'] == 'domain' || $input['portal_mode'] == 'iframe')) {
|
if (isset($input['portal_mode']) && ($input['portal_mode'] == 'domain' || $input['portal_mode'] == 'iframe')) {
|
||||||
$rules['portal_domain'] = 'bail|nullable|sometimes|url';
|
$rules['portal_domain'] = 'bail|nullable|sometimes|url';
|
||||||
|
@ -86,12 +86,28 @@ class Storecove {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
*
|
*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
// documentType : invoice/invoice_response/order
|
||||||
|
// rawDocumentData : {
|
||||||
|
// document: base64_encode($ubl)
|
||||||
|
// parse: true
|
||||||
|
// parseStrategy: ubl
|
||||||
|
// }
|
||||||
*/
|
*/
|
||||||
public function sendDocument($document)
|
public function sendDocument($document)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
$payload = [
|
||||||
|
'documentType' => 'invoice',
|
||||||
|
'rawDocumentData' => base64_encode($document),
|
||||||
|
'parse' => true,
|
||||||
|
'parseStrategy', 'ubl'
|
||||||
|
];
|
||||||
|
|
||||||
$uri = "https://api.storecove.com/api/v2/document_submissions";
|
$uri = "https://api.storecove.com/api/v2/document_submissions";
|
||||||
|
|
||||||
$r = $this->httpClient($uri, (HttpVerb::POST)->value, $document, $this->getHeaders());
|
$r = $this->httpClient($uri, (HttpVerb::POST)->value, $payload, $this->getHeaders());
|
||||||
|
|
||||||
if($r->successful())
|
if($r->successful())
|
||||||
return $r->json()['guid'];
|
return $r->json()['guid'];
|
||||||
@ -101,7 +117,7 @@ class Storecove {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//document submission sending evidence
|
//document submission sending evidence
|
||||||
public function sendingEvidence(string $guid)
|
public function getSendingEvidence(string $guid)
|
||||||
{
|
{
|
||||||
$uri = "https://api.storecove.com/api/v2/document_submissions/{$guid}";
|
$uri = "https://api.storecove.com/api/v2/document_submissions/{$guid}";
|
||||||
$r = $this->httpClient($uri, (HttpVerb::GET)->value, [], $this->getHeaders());
|
$r = $this->httpClient($uri, (HttpVerb::GET)->value, [], $this->getHeaders());
|
||||||
@ -118,7 +134,7 @@ class Storecove {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function httpClient(string $uri, string $verb, array $data, ?array $headers = [])
|
private function httpClient(string $uri, string $verb, array $data, ?array $headers = [])
|
||||||
{
|
{
|
||||||
|
|
||||||
$r = Http::withToken(config('ninja.storecove_api_key'))
|
$r = Http::withToken(config('ninja.storecove_api_key'))
|
||||||
@ -128,10 +144,5 @@ class Storecove {
|
|||||||
return $r;
|
return $r;
|
||||||
}
|
}
|
||||||
|
|
||||||
// curl \
|
|
||||||
// -X POST \
|
|
||||||
// -H "Accept: application/json" \
|
|
||||||
// -H "Authorization: Bearer API_KEY_HERE" \
|
|
||||||
// -H "Content-Type: application/json" \
|
|
||||||
// --data @discovery.json
|
|
||||||
}
|
}
|
@ -17,8 +17,8 @@ return [
|
|||||||
'require_https' => env('REQUIRE_HTTPS', true),
|
'require_https' => env('REQUIRE_HTTPS', true),
|
||||||
'app_url' => rtrim(env('APP_URL', ''), '/'),
|
'app_url' => rtrim(env('APP_URL', ''), '/'),
|
||||||
'app_domain' => env('APP_DOMAIN', 'invoicing.co'),
|
'app_domain' => env('APP_DOMAIN', 'invoicing.co'),
|
||||||
'app_version' => env('APP_VERSION', '5.10.8'),
|
'app_version' => env('APP_VERSION', '5.10.9'),
|
||||||
'app_tag' => env('APP_TAG', '5.10.8'),
|
'app_tag' => env('APP_TAG', '5.10.9'),
|
||||||
'minimum_client_version' => '5.0.16',
|
'minimum_client_version' => '5.0.16',
|
||||||
'terms_version' => '1.0.1',
|
'terms_version' => '1.0.1',
|
||||||
'api_secret' => env('API_SECRET', false),
|
'api_secret' => env('API_SECRET', false),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user