mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-24 02:14:21 -04:00
Docs
This commit is contained in:
parent
87d61262ca
commit
5adc88d01e
@ -41,7 +41,7 @@ class PaymentMethodController extends Controller
|
||||
->editColumn('gateway_type_id', function ($payment_method){
|
||||
return ctrans("texts.{$payment_method->gateway_type->alias}");
|
||||
})->editColumn('created_at', function ($payment_method){
|
||||
return $this->formatDate($payment_method->created_at, auth()->user()->client->date_format());
|
||||
return $this->formatDateTimestamp($payment_method->created_at, auth()->user()->client->date_format());
|
||||
})->editColumn('is_default', function ($payment_method){
|
||||
return $payment_method->is_default ? ctrans('texts.default') : '';
|
||||
})->editColumn('meta', function ($payment_method) {
|
||||
|
@ -266,7 +266,7 @@ class StripePaymentDriver extends BasePaymentDriver
|
||||
+"source": null
|
||||
+"status": "succeeded"
|
||||
*/
|
||||
public function processPaymentResponse($request)
|
||||
public function processPaymentResponse($request) //We never have to worry about unsuccessful payments as failures are handled at the front end for this driver.
|
||||
{
|
||||
$server_response = json_decode($request->input('gateway_response'));
|
||||
|
||||
|
@ -11,6 +11,7 @@
|
||||
|
||||
namespace App\Utils\Traits;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
|
||||
/**
|
||||
@ -60,7 +61,7 @@ trait MakesDates
|
||||
*/
|
||||
public function formatDate($date, string $format) :string
|
||||
{
|
||||
|
||||
|
||||
if(is_string($date))
|
||||
$date = $this->convertToDateObject($date);
|
||||
|
||||
@ -68,6 +69,20 @@ trait MakesDates
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Formats a date
|
||||
* @param Carbon/String $date Carbon object or date string
|
||||
* @param string $format The date display format
|
||||
* @return string The formatted date
|
||||
*/
|
||||
public function formatDateTimestamp($timestamp, string $format) :string
|
||||
{
|
||||
|
||||
return Carbon::createFromTimestamp($date)->format($format);
|
||||
|
||||
}
|
||||
|
||||
private function convertToDateObject($date)
|
||||
{
|
||||
|
||||
|
@ -76,7 +76,7 @@
|
||||
$("#card-button").removeAttr("disabled");
|
||||
|
||||
} else {
|
||||
The card has been successfullly stored.
|
||||
// The card has been successfullly stored.
|
||||
postResult(result);
|
||||
}
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user