Merge branch 'master' into spanish-language
This commit is contained in:
commit
2315f2da5a
|
|
@ -81,7 +81,8 @@ return [
|
|||
'campaigns' => 'Campaigns',
|
||||
'email-templates' => 'Email Templates',
|
||||
'discount' => 'خصم',
|
||||
'cms' => 'CMS'
|
||||
'cms' => 'CMS',
|
||||
'transactions' => 'Transactions'
|
||||
],
|
||||
|
||||
'acl' => [
|
||||
|
|
@ -240,7 +241,9 @@ return [
|
|||
'view' => 'رأي',
|
||||
'rtl' => 'RTL',
|
||||
'ltr' => 'LTR',
|
||||
'update-status' => 'تحديث الحالة'
|
||||
'update-status' => 'تحديث الحالة',
|
||||
'transaction-id' => 'Transaction Id',
|
||||
'transaction-date' => 'Transaction Date',
|
||||
],
|
||||
|
||||
'account' => [
|
||||
|
|
@ -392,6 +395,7 @@ return [
|
|||
'comment' => 'Comment',
|
||||
'submit-comment' => 'Submit Comment',
|
||||
'notify-customer' => 'Notify Customer',
|
||||
'transactions' => 'Transactions'
|
||||
],
|
||||
|
||||
'invoices' => [
|
||||
|
|
@ -468,6 +472,20 @@ return [
|
|||
'action' => 'عمل',
|
||||
'view-title' => '#:refund_id إعادة مال',
|
||||
'invalid-refund-amount-error' => 'يجب ألا يكون المبلغ المسترد صفرًا'
|
||||
],
|
||||
|
||||
'transactions' => [
|
||||
'title' => 'Transactions',
|
||||
'id' => 'Id',
|
||||
'transaction-id' => 'Transaction Id',
|
||||
'payment-method' => 'Payment method',
|
||||
'action' => 'Action',
|
||||
'view-title' => 'Transaction #:transaction_id',
|
||||
'transaction-data' => 'Transaction Data',
|
||||
'order-id' => 'Order Id',
|
||||
'status' => 'Status',
|
||||
'created-at' => 'Created At',
|
||||
'transaction-details' => 'Transaction Details'
|
||||
]
|
||||
],
|
||||
|
||||
|
|
|
|||
|
|
@ -81,6 +81,7 @@ return [
|
|||
'tax-rates' => 'Steuersätze',
|
||||
'discount' => 'Rabatt',
|
||||
'cms' => 'CMS',
|
||||
'transactions' => 'Transactions'
|
||||
],
|
||||
'acl' =>
|
||||
[
|
||||
|
|
@ -240,6 +241,8 @@ return [
|
|||
'rtl' => 'RTL',
|
||||
'ltr' => 'LTR',
|
||||
'update-status' => 'Update-Status',
|
||||
'transaction-id' => 'Transaction Id',
|
||||
'transaction-date' => 'Transaction Date',
|
||||
],
|
||||
'account' =>
|
||||
[
|
||||
|
|
@ -388,6 +391,7 @@ return [
|
|||
'cancel-confirm-msg' => 'Sind Sie sicher, dass Sie diese Bestellung stornieren möchten?',
|
||||
'refund-btn-title' => 'Rückerstattung',
|
||||
'refunds' => 'Erstattungen',
|
||||
'transactions' => 'Transactions'
|
||||
],
|
||||
'invoices' =>
|
||||
[
|
||||
|
|
@ -462,6 +466,20 @@ return [
|
|||
'view-title' => 'Rückerstattung #:refund_id',
|
||||
'invalid-refund-amount-error' => 'Der Rückerstattungsbetrag sollte nicht Null sein.',
|
||||
],
|
||||
|
||||
'transactions' => [
|
||||
'title' => 'Transactions',
|
||||
'id' => 'Id',
|
||||
'transaction-id' => 'Transaction Id',
|
||||
'payment-method' => 'Payment method',
|
||||
'action' => 'Action',
|
||||
'view-title' => 'Transaction #:transaction_id',
|
||||
'transaction-data' => 'Transaction Data',
|
||||
'order-id' => 'Order Id',
|
||||
'status' => 'Status',
|
||||
'created-at' => 'Created At',
|
||||
'transaction-details' => 'Transaction Details'
|
||||
]
|
||||
],
|
||||
'catalog' =>
|
||||
[
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -251,7 +251,7 @@ return [
|
|||
'update-status' => 'Actualizar Estado',
|
||||
'subject' => 'Asunto',
|
||||
'date' => 'Fecha',
|
||||
'transaction-id' => 'ID de Transacción',
|
||||
'transaction-id' => 'Transacción #',
|
||||
'transaction-date' => 'Fecha de Transacción',
|
||||
],
|
||||
|
||||
|
|
@ -486,8 +486,8 @@ return [
|
|||
|
||||
'transactions' => [
|
||||
'title' => 'Transacciones',
|
||||
'id' => 'Id',
|
||||
'transaction-id' => 'ID de Transacción',
|
||||
'id' => 'ID',
|
||||
'transaction-id' => 'Transacción #',
|
||||
'payment-method' => 'Método de Pago',
|
||||
'action' => 'Accción',
|
||||
'view-title' => 'Transacciónn #:transaction_id',
|
||||
|
|
|
|||
|
|
@ -80,7 +80,8 @@ return [
|
|||
'campaigns' => 'Campaigns',
|
||||
'email-templates' => 'Email Templates',
|
||||
'discount' => 'تخفیف',
|
||||
'cms' => 'CMS'
|
||||
'cms' => 'CMS',
|
||||
'transactions' => 'Transactions'
|
||||
],
|
||||
|
||||
'acl' => [
|
||||
|
|
@ -238,7 +239,9 @@ return [
|
|||
'view' => 'چشم انداز',
|
||||
'rtl' => 'RTL',
|
||||
'ltr' => 'LTR',
|
||||
'update-status' => 'وضعیت به روز رسانی'
|
||||
'update-status' => 'وضعیت به روز رسانی',
|
||||
'transaction-id' => 'Transaction Id',
|
||||
'transaction-date' => 'Transaction Date',
|
||||
],
|
||||
|
||||
'account' => [
|
||||
|
|
@ -390,6 +393,7 @@ return [
|
|||
'comment' => 'Comment',
|
||||
'submit-comment' => 'Submit Comment',
|
||||
'notify-customer' => 'Notify Customer',
|
||||
'transactions' => 'Transactions'
|
||||
],
|
||||
|
||||
'invoices' => [
|
||||
|
|
@ -466,6 +470,20 @@ return [
|
|||
'view-title' => ' #:refund_id بازپرداخت',
|
||||
'invalid-refund-amount-error' => 'مبلغ بازپرداخت باید صفر نباشد.'
|
||||
|
||||
],
|
||||
|
||||
'transactions' => [
|
||||
'title' => 'Transactions',
|
||||
'id' => 'Id',
|
||||
'transaction-id' => 'Transaction Id',
|
||||
'payment-method' => 'Payment method',
|
||||
'action' => 'Action',
|
||||
'view-title' => 'Transaction #:transaction_id',
|
||||
'transaction-data' => 'Transaction Data',
|
||||
'order-id' => 'Order Id',
|
||||
'status' => 'Status',
|
||||
'created-at' => 'Created At',
|
||||
'transaction-details' => 'Transaction Details'
|
||||
]
|
||||
],
|
||||
|
||||
|
|
|
|||
|
|
@ -80,7 +80,8 @@ return [
|
|||
'campaigns' => 'Campaigns',
|
||||
'email-templates' => 'Email Templates',
|
||||
'discount' => 'Sconti',
|
||||
'cms' => 'CMS'
|
||||
'cms' => 'CMS',
|
||||
'transactions' => 'Transactions'
|
||||
],
|
||||
|
||||
'acl' => [
|
||||
|
|
@ -239,7 +240,9 @@ return [
|
|||
'view' => 'Vedi',
|
||||
'rtl' => 'RTL',
|
||||
'ltr' => 'LTR',
|
||||
'update-status' => 'Update Stato'
|
||||
'update-status' => 'Update Stato',
|
||||
'transaction-id' => 'Transaction Id',
|
||||
'transaction-date' => 'Transaction Date',
|
||||
],
|
||||
|
||||
'account' => [
|
||||
|
|
@ -392,7 +395,8 @@ return [
|
|||
'submit-comment' => 'Invia Commento',
|
||||
'notify-customer' => 'Notifica Cliente',
|
||||
'customer-notified' => ':date | Cliente <b>Notificato</b>',
|
||||
'customer-not-notified' => ':date | Cliente <b>Non Notificato</b>'
|
||||
'customer-not-notified' => ':date | Cliente <b>Non Notificato</b>',
|
||||
'transactions' => 'Transactions'
|
||||
],
|
||||
|
||||
'invoices' => [
|
||||
|
|
@ -468,6 +472,20 @@ return [
|
|||
'view-title' => 'Rimborso #:refund_id',
|
||||
'invalid-refund-amount-error' => 'La somma rimborsata dovrebbe essere diversa da zero.'
|
||||
|
||||
],
|
||||
|
||||
'transactions' => [
|
||||
'title' => 'Transactions',
|
||||
'id' => 'Id',
|
||||
'transaction-id' => 'Transaction Id',
|
||||
'payment-method' => 'Payment method',
|
||||
'action' => 'Action',
|
||||
'view-title' => 'Transaction #:transaction_id',
|
||||
'transaction-data' => 'Transaction Data',
|
||||
'order-id' => 'Order Id',
|
||||
'status' => 'Status',
|
||||
'created-at' => 'Created At',
|
||||
'transaction-details' => 'Transaction Details'
|
||||
]
|
||||
],
|
||||
|
||||
|
|
|
|||
|
|
@ -80,7 +80,8 @@ return [
|
|||
'campaigns' => 'Campaigns',
|
||||
'email-templates' => 'Email Templates',
|
||||
'discount' => 'Korting',
|
||||
'cms' => 'CMS'
|
||||
'cms' => 'CMS',
|
||||
'transactions' => 'Transactions'
|
||||
],
|
||||
|
||||
'acl' => [
|
||||
|
|
@ -391,6 +392,7 @@ return [
|
|||
'comment' => 'Comment',
|
||||
'submit-comment' => 'Submit Comment',
|
||||
'notify-customer' => 'Notify Customer',
|
||||
'transactions' => 'Transactions'
|
||||
],
|
||||
|
||||
'invoices' => [
|
||||
|
|
@ -467,6 +469,20 @@ return [
|
|||
'view-title' => 'Terugbetaling #:refund_id',
|
||||
'invalid-refund-amount-error' => 'Het restitutiebedrag mag niet nul zijn.'
|
||||
|
||||
],
|
||||
|
||||
'transactions' => [
|
||||
'title' => 'Transactions',
|
||||
'id' => 'Id',
|
||||
'transaction-id' => 'Transaction Id',
|
||||
'payment-method' => 'Payment method',
|
||||
'action' => 'Action',
|
||||
'view-title' => 'Transaction #:transaction_id',
|
||||
'transaction-data' => 'Transaction Data',
|
||||
'order-id' => 'Order Id',
|
||||
'status' => 'Status',
|
||||
'created-at' => 'Created At',
|
||||
'transaction-details' => 'Transaction Details'
|
||||
]
|
||||
],
|
||||
|
||||
|
|
|
|||
|
|
@ -79,7 +79,8 @@ return [
|
|||
'campaigns' => 'Campaigns',
|
||||
'email-templates' => 'Email Templates',
|
||||
'discount' => 'Rabat',
|
||||
'cms' => 'System CMS'
|
||||
'cms' => 'System CMS',
|
||||
'transactions' => 'Transactions'
|
||||
],
|
||||
|
||||
'acl' => [
|
||||
|
|
@ -237,7 +238,9 @@ return [
|
|||
'view' => 'Widok',
|
||||
'rtl' => 'RTL',
|
||||
'ltr' => 'LTR',
|
||||
'update-status' => 'Aktualizcja statusu'
|
||||
'update-status' => 'Aktualizcja statusu',
|
||||
'transaction-id' => 'Transaction Id',
|
||||
'transaction-date' => 'Transaction Date',
|
||||
],
|
||||
|
||||
'account' => [
|
||||
|
|
@ -390,7 +393,8 @@ return [
|
|||
'submit-comment' => 'Prześlij komentarz',
|
||||
'notify-customer' => 'Powiadom klienta',
|
||||
'customer-notified' => ':date | Klient <b>Powiadomiony</b>',
|
||||
'customer-not-notified' => ':date | Klient <b>Nie powiadomiony</b>'
|
||||
'customer-not-notified' => ':date | Klient <b>Nie powiadomiony</b>',
|
||||
'transactions' => 'Transactions'
|
||||
],
|
||||
|
||||
'invoices' => [
|
||||
|
|
@ -467,6 +471,20 @@ return [
|
|||
'view-title' => 'Refundacja nr #:refund_id',
|
||||
'invalid-refund-amount-error' => 'Kwota zwrotu powinna być różna od zera.'
|
||||
|
||||
],
|
||||
|
||||
'transactions' => [
|
||||
'title' => 'Transactions',
|
||||
'id' => 'Id',
|
||||
'transaction-id' => 'Transaction Id',
|
||||
'payment-method' => 'Payment method',
|
||||
'action' => 'Action',
|
||||
'view-title' => 'Transaction #:transaction_id',
|
||||
'transaction-data' => 'Transaction Data',
|
||||
'order-id' => 'Order Id',
|
||||
'status' => 'Status',
|
||||
'created-at' => 'Created At',
|
||||
'transaction-details' => 'Transaction Details'
|
||||
]
|
||||
],
|
||||
|
||||
|
|
|
|||
|
|
@ -80,7 +80,8 @@ return [
|
|||
'campaigns' => 'Campaigns',
|
||||
'email-templates' => 'Email Templates',
|
||||
'discount' => 'Desconto',
|
||||
'cms' => 'CMS'
|
||||
'cms' => 'CMS',
|
||||
'transactions' => 'Transactions'
|
||||
],
|
||||
|
||||
'acl' => [
|
||||
|
|
@ -238,7 +239,9 @@ return [
|
|||
'view' => 'Visão',
|
||||
'rtl' => 'RTL',
|
||||
'ltr' => 'LTR',
|
||||
'update-status' => 'Atualizar o status'
|
||||
'update-status' => 'Atualizar o status',
|
||||
'transaction-id' => 'Transaction Id',
|
||||
'transaction-date' => 'Transaction Date',
|
||||
],
|
||||
|
||||
'account' => [
|
||||
|
|
@ -390,6 +393,7 @@ return [
|
|||
'comment' => 'Comment',
|
||||
'submit-comment' => 'Submit Comment',
|
||||
'notify-customer' => 'Notify Customer',
|
||||
'transactions' => 'Transactions'
|
||||
],
|
||||
|
||||
'invoices' => [
|
||||
|
|
@ -466,6 +470,20 @@ return [
|
|||
'view-title' => 'Reembolso #:refund_id',
|
||||
'invalid-refund-amount-error' => 'Refund amount should be non zero.'
|
||||
|
||||
],
|
||||
|
||||
'transactions' => [
|
||||
'title' => 'Transactions',
|
||||
'id' => 'Id',
|
||||
'transaction-id' => 'Transaction Id',
|
||||
'payment-method' => 'Payment method',
|
||||
'action' => 'Action',
|
||||
'view-title' => 'Transaction #:transaction_id',
|
||||
'transaction-data' => 'Transaction Data',
|
||||
'order-id' => 'Order Id',
|
||||
'status' => 'Status',
|
||||
'created-at' => 'Created At',
|
||||
'transaction-details' => 'Transaction Details'
|
||||
]
|
||||
],
|
||||
|
||||
|
|
|
|||
|
|
@ -78,7 +78,8 @@ return [
|
|||
'campaigns' => 'Campaigns',
|
||||
'email-templates' => 'Email Templates',
|
||||
'discount' => 'İndirim',
|
||||
'cms' => 'CMS'
|
||||
'cms' => 'CMS',
|
||||
'transactions' => 'Transactions'
|
||||
],
|
||||
|
||||
'acl' => [
|
||||
|
|
@ -236,7 +237,9 @@ return [
|
|||
'view' => 'Görüntüle',
|
||||
'rtl' => 'RTL',
|
||||
'ltr' => 'LTR',
|
||||
'update-status' => 'Durum Güncelle'
|
||||
'update-status' => 'Durum Güncelle',
|
||||
'transaction-id' => 'Transaction Id',
|
||||
'transaction-date' => 'Transaction Date',
|
||||
],
|
||||
|
||||
'account' => [
|
||||
|
|
@ -388,7 +391,8 @@ return [
|
|||
'submit-comment' => 'Yorum Gönder',
|
||||
'notify-customer' => 'Müşteriyi Bilgilendir',
|
||||
'customer-notified' => ':date | Müşteri <b>Bilgilendirildi</b>',
|
||||
'customer-not-notified' => ':date | Müşteri <b>Bilgilendirilmedi</b>'
|
||||
'customer-not-notified' => ':date | Müşteri <b>Bilgilendirilmedi</b>',
|
||||
'transactions' => 'Transactions'
|
||||
],
|
||||
|
||||
'invoices' => [
|
||||
|
|
@ -465,6 +469,20 @@ return [
|
|||
'view-title' => 'İade #:refund_id',
|
||||
'invalid-refund-amount-error' => 'Lütfen iade miktarını giriniz.'
|
||||
|
||||
],
|
||||
|
||||
'transactions' => [
|
||||
'title' => 'Transactions',
|
||||
'id' => 'Id',
|
||||
'transaction-id' => 'Transaction Id',
|
||||
'payment-method' => 'Payment method',
|
||||
'action' => 'Action',
|
||||
'view-title' => 'Transaction #:transaction_id',
|
||||
'transaction-data' => 'Transaction Data',
|
||||
'order-id' => 'Order Id',
|
||||
'status' => 'Status',
|
||||
'created-at' => 'Created At',
|
||||
'transaction-details' => 'Transaction Details'
|
||||
]
|
||||
],
|
||||
|
||||
|
|
|
|||
|
|
@ -2,34 +2,42 @@
|
|||
|
||||
namespace Webkul\Paypal\Helpers;
|
||||
|
||||
use Webkul\Paypal\Payment\Standard;
|
||||
use Webkul\Sales\Repositories\OrderRepository;
|
||||
use Webkul\Sales\Repositories\InvoiceRepository;
|
||||
|
||||
class Ipn
|
||||
{
|
||||
/**
|
||||
* Ipn post data
|
||||
* IPN post data.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $post;
|
||||
|
||||
/**
|
||||
* Order object
|
||||
* Standard $paypalStandard
|
||||
*
|
||||
* @var \Webkul\Paypal\Payment\Standard
|
||||
*/
|
||||
protected $paypalStandard;
|
||||
|
||||
/**
|
||||
* Order $order
|
||||
*
|
||||
* @var \Webkul\Sales\Contracts\Order
|
||||
*/
|
||||
protected $order;
|
||||
|
||||
/**
|
||||
* OrderRepository object
|
||||
* OrderRepository $orderRepository
|
||||
*
|
||||
* @var \Webkul\Sales\Repositories\OrderRepository
|
||||
*/
|
||||
protected $orderRepository;
|
||||
|
||||
/**
|
||||
* InvoiceRepository object
|
||||
* InvoiceRepository $invoiceRepository
|
||||
*
|
||||
* @var \Webkul\Sales\Repositories\InvoiceRepository
|
||||
*/
|
||||
|
|
@ -40,20 +48,24 @@ class Ipn
|
|||
*
|
||||
* @param \Webkul\Sales\Repositories\OrderRepository $orderRepository
|
||||
* @param \Webkul\Sales\Repositories\InvoiceRepository $invoiceRepository
|
||||
* @param \Webkul\Paypal\Payment\Standard $paypalStandard
|
||||
* @return void
|
||||
*/
|
||||
public function __construct(
|
||||
Standard $paypalStandard,
|
||||
OrderRepository $orderRepository,
|
||||
InvoiceRepository $invoiceRepository
|
||||
)
|
||||
{
|
||||
$this->paypalStandard = $paypalStandard;
|
||||
|
||||
$this->orderRepository = $orderRepository;
|
||||
|
||||
$this->invoiceRepository = $invoiceRepository;
|
||||
}
|
||||
|
||||
/**
|
||||
* This function process the ipn sent from paypal end
|
||||
* This function process the IPN sent from paypal end.
|
||||
*
|
||||
* @param array $post
|
||||
* @return null|void|\Exception
|
||||
|
|
@ -80,7 +92,7 @@ class Ipn
|
|||
}
|
||||
|
||||
/**
|
||||
* Load order via ipn invoice id
|
||||
* Load order via IPN invoice id.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
|
|
@ -92,7 +104,7 @@ class Ipn
|
|||
}
|
||||
|
||||
/**
|
||||
* Process order and create invoice
|
||||
* Process order and create invoice.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
|
|
@ -112,13 +124,13 @@ class Ipn
|
|||
}
|
||||
|
||||
/**
|
||||
* Prepares order's invoice data for creation
|
||||
* Prepares order's invoice data for creation.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected function prepareInvoiceData()
|
||||
{
|
||||
$invoiceData = ["order_id" => $this->order->id,];
|
||||
$invoiceData = ['order_id' => $this->order->id];
|
||||
|
||||
foreach ($this->order->items as $item) {
|
||||
$invoiceData['invoice']['items'][$item->id] = $item->qty_to_invoice;
|
||||
|
|
@ -128,24 +140,20 @@ class Ipn
|
|||
}
|
||||
|
||||
/**
|
||||
* Post back to PayPal to check whether this request is a valid one
|
||||
* Post back to PayPal to check whether this request is a valid one.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
protected function postBack()
|
||||
{
|
||||
if (array_key_exists('test_ipn', $this->post) && 1 === (int) $this->post['test_ipn']) {
|
||||
$url = 'https://www.sandbox.paypal.com/cgi-bin/webscr';
|
||||
} else {
|
||||
$url = 'https://www.paypal.com/cgi-bin/webscr';
|
||||
}
|
||||
$url = $this->paypalStandard->getIPNUrl();
|
||||
|
||||
$request = curl_init();
|
||||
|
||||
curl_setopt_array($request, [
|
||||
CURLOPT_URL => $url,
|
||||
CURLOPT_POST => TRUE,
|
||||
CURLOPT_POSTFIELDS => http_build_query(array('cmd' => '_notify-validate') + $this->post),
|
||||
CURLOPT_POSTFIELDS => http_build_query(['cmd' => '_notify-validate'] + $this->post),
|
||||
CURLOPT_RETURNTRANSFER => TRUE,
|
||||
CURLOPT_HEADER => FALSE,
|
||||
]);
|
||||
|
|
@ -161,4 +169,4 @@ class Ipn
|
|||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,21 +2,21 @@
|
|||
|
||||
namespace Webkul\Paypal\Http\Controllers;
|
||||
|
||||
use Webkul\Paypal\Helpers\Ipn;
|
||||
use Webkul\Checkout\Facades\Cart;
|
||||
use Webkul\Sales\Repositories\OrderRepository;
|
||||
use Webkul\Paypal\Helpers\Ipn;
|
||||
|
||||
class StandardController extends Controller
|
||||
{
|
||||
/**
|
||||
* OrderRepository object
|
||||
* OrderRepository $orderRepository
|
||||
*
|
||||
* @var \Webkul\Sales\Repositories\OrderRepository
|
||||
*/
|
||||
protected $orderRepository;
|
||||
|
||||
/**
|
||||
* Ipn object
|
||||
* IPN $ipnHelper
|
||||
*
|
||||
* @var \Webkul\Paypal\Helpers\Ipn
|
||||
*/
|
||||
|
|
@ -62,7 +62,7 @@ class StandardController extends Controller
|
|||
}
|
||||
|
||||
/**
|
||||
* Success payment
|
||||
* Success payment.
|
||||
*
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
|
|
@ -78,7 +78,7 @@ class StandardController extends Controller
|
|||
}
|
||||
|
||||
/**
|
||||
* Paypal Ipn listener
|
||||
* Paypal IPN listener.
|
||||
*
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -16,4 +16,4 @@ Route::group(['middleware' => ['web']], function () {
|
|||
});
|
||||
});
|
||||
|
||||
Route::get('paypal/standard/ipn', 'Webkul\Paypal\Http\Controllers\StandardController@ipn')->name('paypal.standard.ipn');
|
||||
Route::post('paypal/standard/ipn', 'Webkul\Paypal\Http\Controllers\StandardController@ipn')->name('paypal.standard.ipn');
|
||||
|
|
|
|||
|
|
@ -68,6 +68,16 @@ class Transaction
|
|||
$this->orderTransactionRepository->create($transactionData);
|
||||
}
|
||||
}
|
||||
} else if ($invoice->order->payment->method == 'paypal_standard') {
|
||||
$transactionData['transaction_id'] = $data['txn_id'];
|
||||
$transactionData['status'] = $data['payment_status'];
|
||||
$transactionData['type'] = $data['payment_type'];
|
||||
$transactionData['payment_method'] = $invoice->order->payment->method;
|
||||
$transactionData['order_id'] = $invoice->order->id;
|
||||
$transactionData['invoice_id'] = $invoice->id;
|
||||
$transactionData['data'] = json_encode ($data);
|
||||
|
||||
$this->orderTransactionRepository->create($transactionData);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -5,14 +5,14 @@ namespace Webkul\Paypal\Payment;
|
|||
class Standard extends Paypal
|
||||
{
|
||||
/**
|
||||
* Payment method code
|
||||
* Payment method code.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $code = 'paypal_standard';
|
||||
|
||||
/**
|
||||
* Line items fields mapping
|
||||
* Line items fields mapping.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
|
|
@ -24,7 +24,7 @@ class Standard extends Paypal
|
|||
];
|
||||
|
||||
/**
|
||||
* Return paypal redirect url
|
||||
* Return paypal redirect url.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
|
|
@ -34,7 +34,20 @@ class Standard extends Paypal
|
|||
}
|
||||
|
||||
/**
|
||||
* Return form field array
|
||||
* Return paypal IPN url.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getIPNUrl()
|
||||
{
|
||||
return $this->getConfigData('sandbox')
|
||||
? 'https://ipnpb.sandbox.paypal.com/cgi-bin/webscr'
|
||||
: 'https://ipnpb.paypal.com/cgi-bin/webscr';
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Return form field array.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
|
|
@ -89,7 +102,7 @@ class Standard extends Paypal
|
|||
}
|
||||
|
||||
/**
|
||||
* Add shipping as item
|
||||
* Add shipping as item.
|
||||
*
|
||||
* @param array $fields
|
||||
* @param int $i
|
||||
|
|
|
|||
Loading…
Reference in New Issue