Add SOFORT support on Stripe

This commit is contained in:
Hillel Coren 2017-09-06 11:45:50 +03:00
parent be8b966e0e
commit a48a493a3b
3 changed files with 3 additions and 1 deletions

View File

@ -52,7 +52,7 @@ class PaymentDatatable extends EntityDatatable
[
'method',
function ($model) {
return ($model->payment_type && ! $model->last4) ? trans('texts.payment_type_' . $model->payment_type) : ($model->account_gateway_id ? $model->gateway_name : '');
return $model->account_gateway_id ? $model->gateway_name : ($model->payment_type ? trans('texts.payment_type_' . $model->payment_type) : '');
},
],
[

View File

@ -505,6 +505,7 @@ class StripePaymentDriver extends BasePaymentDriver
}
$data = sprintf('amount=%d&currency=%s&source=%s', $source['amount'], $source['currency'], $source['id']);
$this->purchaseResponse = $response = $this->makeStripeCall('POST', 'charges', $data);
$this->gatewayType = GatewayType::getIdFromAlias($source['type']);
if (is_array($response) && isset($response['id'])) {
$this->createPayment($response['id']);
}

View File

@ -1411,6 +1411,7 @@ $LANG = array(
'payment_type_iZettle' => 'iZettle',
'payment_type_Swish' => 'Swish',
'payment_type_Alipay' => 'Alipay',
'payment_type_Sofort' => 'Sofort',
// Industries
'industry_Accounting & Legal' => 'Accounting & Legal',