1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 05:02:36 +01:00

Resolve conflicts (#3043)

* Request Cancellation

* Add fields to settings

* Recurring invoice cancellation request

* Stub Template controller

* Template Controller

* Fixes for git commit
This commit is contained in:
David Bomba 2019-11-05 10:26:15 +11:00 committed by GitHub
parent 11690ae50e
commit 06a120e128
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 52 additions and 43 deletions

View File

@ -34,17 +34,17 @@ class TemplateController extends BaseController
* description="Returns a blank HTML entity temlpate",
* @OA\Parameter(ref="#/components/parameters/X-Api-Secret"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(
* name="entity",
* in="path",
* description="The Entity (invoice,quote,recurring_invoice)",
* example="invoice",
* required=true,
* @OA\Schema(
* type="string",
* format="string",
* ),
* ),
* @OA\Parameter(
* name="entity",
* in="path",
* description="The Entity (invoice,quote,recurring_invoice)",
* example="invoice",
* required=true,
* @OA\Schema(
* type="string",
* format="string",
* ),
* ),
* @OA\Response(
* response=200,
* description="The template response",
@ -68,6 +68,7 @@ class TemplateController extends BaseController
*/
public function create($entity)
{
return response()->json(request()->all(), 200);
}
@ -81,31 +82,31 @@ class TemplateController extends BaseController
* operationId="getShowTemplate",
* tags={"templates"},
* summary="Returns a entity template with the template variables replaced with the Entities",
* description="Returns a blank HTML entity temlpate",
* description="Returns a entity template with the template variables replaced with the Entities",
* @OA\Parameter(ref="#/components/parameters/X-Api-Secret"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(
* name="entity",
* in="path",
* description="The Entity (invoice,quote,recurring_invoice)",
* example="invoice",
* required=true,
* @OA\Schema(
* type="string",
* format="string",
* ),
* ),
* @OA\Parameter(
* name="entity_id",
* in="path",
* description="The Entity ID",
* example="X9f87dkf",
* required=true,
* @OA\Schema(
* type="string",
* format="string",
* ),
* ),
* @OA\Parameter(
* name="entity",
* in="path",
* description="The Entity (invoice,quote,recurring_invoice)",
* example="invoice",
* required=true,
* @OA\Schema(
* type="string",
* format="string",
* ),
* ),
* @OA\Parameter(
* name="entity_id",
* in="path",
* description="The Entity ID",
* example="X9f87dkf",
* required=true,
* @OA\Schema(
* type="string",
* format="string",
* ),
* ),
* @OA\Response(
* response=200,
* description="The template response",
@ -129,6 +130,7 @@ class TemplateController extends BaseController
*/
public function show($entity, $entity_id)
{
return response()->json(request()->all(), 200);
}

View File

@ -344,18 +344,11 @@ class User extends Authenticatable implements MustVerifyEmail
return config('ninja.notification.slack');
}
public function preferredLocale()
{
\Log::error(print_r($this->company(),1));
$lang = Language::find($this->company()->settings->language_id);
return $lang->locale;
}
public function routeNotificationForMail($notification)
{
return $this->email;
}
}

View File

@ -18,6 +18,7 @@ use App\Models\ClientGatewayToken;
use App\Models\GatewayType;
use App\Models\Payment;
use App\Models\PaymentType;
use App\Models\SystemLog;
use App\Utils\Traits\MakesHash;
use Illuminate\Http\Request;
use Omnipay\Common\Item;
@ -130,7 +131,20 @@ class PayPalExpressPaymentDriver extends BasePaymentDriver
if ($response->isCancelled()) {
return redirect()->route('client.invoices.index')->with('warning',ctrans('texts.status_voided'));
} elseif (! $response->isSuccessful()) {
}
elseif($response->isSuccessful()){
SystemLogger::dispatch([
'server_response' => $response->getData(),
'data' => $request->all()
],
SystemLog::CATEGORY_GATEWAY_RESPONSE,
SystemLog::EVENT_GATEWAY_SUCCESS,
SystemLog::TYPE_PAYPAL,
$this->client
);
}
elseif (! $response->isSuccessful()) {
SystemLogger::dispatch([