diff --git a/app/Constants.php b/app/Constants.php index 95a031d7ae..2159a09816 100644 --- a/app/Constants.php +++ b/app/Constants.php @@ -403,7 +403,8 @@ if (! defined('APP_NAME')) { define('PAYMENT_TYPE_MAESTRO', 21); define('PAYMENT_TYPE_SOLO', 22); define('PAYMENT_TYPE_SWITCH', 23); - define('PAYMENT_TYPE_ALIPAY', 24); + define('PAYMENT_TYPE_ALIPAY', 28); + define('PAYMENT_TYPE_SOFORT', 29); define('PAYMENT_METHOD_STATUS_NEW', 'new'); define('PAYMENT_METHOD_STATUS_VERIFICATION_FAILED', 'verification_failed'); diff --git a/app/Ninja/Datatables/PaymentDatatable.php b/app/Ninja/Datatables/PaymentDatatable.php index b87dfde0be..90ca637c5b 100644 --- a/app/Ninja/Datatables/PaymentDatatable.php +++ b/app/Ninja/Datatables/PaymentDatatable.php @@ -67,7 +67,7 @@ class PaymentDatatable extends EntityDatatable return '' . htmlentities($card_type) . '  •••' . $model->last4 . ' ' . $expiration; } elseif ($model->email) { return $model->email; - } else { + } elseif ($model->payment_type) { return trans('texts.payment_type_' . $model->payment_type); } } elseif ($model->last4) { diff --git a/app/Ninja/PaymentDrivers/StripePaymentDriver.php b/app/Ninja/PaymentDrivers/StripePaymentDriver.php index 004c4774ff..104b7103bb 100644 --- a/app/Ninja/PaymentDrivers/StripePaymentDriver.php +++ b/app/Ninja/PaymentDrivers/StripePaymentDriver.php @@ -250,6 +250,8 @@ class StripePaymentDriver extends BasePaymentDriver $payment->payment_status_id = $this->purchaseResponse['status'] == 'succeeded' ? PAYMENT_STATUS_COMPLETED : PAYMENT_STATUS_PENDING; if ($isAlipay) { $payment->payment_type_id = PAYMENT_TYPE_ALIPAY; + } elseif ($this->shouldUseSource()) { + $payment->payment_type_id = PAYMENT_TYPE_SOFORT; } }