mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-31 05:34:34 -04: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:
parent
11690ae50e
commit
06a120e128
@ -34,17 +34,17 @@ class TemplateController extends BaseController
|
|||||||
* description="Returns a blank HTML entity temlpate",
|
* description="Returns a blank HTML entity temlpate",
|
||||||
* @OA\Parameter(ref="#/components/parameters/X-Api-Secret"),
|
* @OA\Parameter(ref="#/components/parameters/X-Api-Secret"),
|
||||||
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
|
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
|
||||||
* @OA\Parameter(
|
* @OA\Parameter(
|
||||||
* name="entity",
|
* name="entity",
|
||||||
* in="path",
|
* in="path",
|
||||||
* description="The Entity (invoice,quote,recurring_invoice)",
|
* description="The Entity (invoice,quote,recurring_invoice)",
|
||||||
* example="invoice",
|
* example="invoice",
|
||||||
* required=true,
|
* required=true,
|
||||||
* @OA\Schema(
|
* @OA\Schema(
|
||||||
* type="string",
|
* type="string",
|
||||||
* format="string",
|
* format="string",
|
||||||
* ),
|
* ),
|
||||||
* ),
|
* ),
|
||||||
* @OA\Response(
|
* @OA\Response(
|
||||||
* response=200,
|
* response=200,
|
||||||
* description="The template response",
|
* description="The template response",
|
||||||
@ -68,6 +68,7 @@ class TemplateController extends BaseController
|
|||||||
*/
|
*/
|
||||||
public function create($entity)
|
public function create($entity)
|
||||||
{
|
{
|
||||||
|
|
||||||
return response()->json(request()->all(), 200);
|
return response()->json(request()->all(), 200);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -81,31 +82,31 @@ class TemplateController extends BaseController
|
|||||||
* operationId="getShowTemplate",
|
* operationId="getShowTemplate",
|
||||||
* tags={"templates"},
|
* tags={"templates"},
|
||||||
* summary="Returns a entity template with the template variables replaced with the Entities",
|
* 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-Api-Secret"),
|
||||||
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
|
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
|
||||||
* @OA\Parameter(
|
* @OA\Parameter(
|
||||||
* name="entity",
|
* name="entity",
|
||||||
* in="path",
|
* in="path",
|
||||||
* description="The Entity (invoice,quote,recurring_invoice)",
|
* description="The Entity (invoice,quote,recurring_invoice)",
|
||||||
* example="invoice",
|
* example="invoice",
|
||||||
* required=true,
|
* required=true,
|
||||||
* @OA\Schema(
|
* @OA\Schema(
|
||||||
* type="string",
|
* type="string",
|
||||||
* format="string",
|
* format="string",
|
||||||
* ),
|
* ),
|
||||||
* ),
|
* ),
|
||||||
* @OA\Parameter(
|
* @OA\Parameter(
|
||||||
* name="entity_id",
|
* name="entity_id",
|
||||||
* in="path",
|
* in="path",
|
||||||
* description="The Entity ID",
|
* description="The Entity ID",
|
||||||
* example="X9f87dkf",
|
* example="X9f87dkf",
|
||||||
* required=true,
|
* required=true,
|
||||||
* @OA\Schema(
|
* @OA\Schema(
|
||||||
* type="string",
|
* type="string",
|
||||||
* format="string",
|
* format="string",
|
||||||
* ),
|
* ),
|
||||||
* ),
|
* ),
|
||||||
* @OA\Response(
|
* @OA\Response(
|
||||||
* response=200,
|
* response=200,
|
||||||
* description="The template response",
|
* description="The template response",
|
||||||
@ -129,6 +130,7 @@ class TemplateController extends BaseController
|
|||||||
*/
|
*/
|
||||||
public function show($entity, $entity_id)
|
public function show($entity, $entity_id)
|
||||||
{
|
{
|
||||||
|
|
||||||
return response()->json(request()->all(), 200);
|
return response()->json(request()->all(), 200);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -344,18 +344,11 @@ class User extends Authenticatable implements MustVerifyEmail
|
|||||||
return config('ninja.notification.slack');
|
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)
|
public function routeNotificationForMail($notification)
|
||||||
{
|
{
|
||||||
return $this->email;
|
return $this->email;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -18,6 +18,7 @@ use App\Models\ClientGatewayToken;
|
|||||||
use App\Models\GatewayType;
|
use App\Models\GatewayType;
|
||||||
use App\Models\Payment;
|
use App\Models\Payment;
|
||||||
use App\Models\PaymentType;
|
use App\Models\PaymentType;
|
||||||
|
use App\Models\SystemLog;
|
||||||
use App\Utils\Traits\MakesHash;
|
use App\Utils\Traits\MakesHash;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
use Omnipay\Common\Item;
|
use Omnipay\Common\Item;
|
||||||
@ -130,7 +131,20 @@ class PayPalExpressPaymentDriver extends BasePaymentDriver
|
|||||||
|
|
||||||
if ($response->isCancelled()) {
|
if ($response->isCancelled()) {
|
||||||
return redirect()->route('client.invoices.index')->with('warning',ctrans('texts.status_voided'));
|
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([
|
SystemLogger::dispatch([
|
||||||
|
Loading…
x
Reference in New Issue
Block a user