updated
This commit is contained in:
@@ -28,30 +28,43 @@ class PaypalController extends Controller
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$paypal_env = "live";
|
||||
$paypal_apiUrl = 'https://api.paypal.com'; // default
|
||||
|
||||
if($paypal_env == 'live'){
|
||||
|
||||
$paypal_apiUrl = 'https://api.paypal.com';
|
||||
}else{
|
||||
$paypal_apiUrl = 'https://api.sandbox.paypal.com';
|
||||
}
|
||||
|
||||
$this->_apiContext = PayPal::ApiContext(
|
||||
config('services.paypal.client_id'),
|
||||
config('services.paypal.secret')
|
||||
config('services.paypal_'.$paypal_env.'.client_id'),
|
||||
config('services.paypal_'.$paypal_env.'.secret')
|
||||
|
||||
// config('services.paypal_live.client_id'),
|
||||
// config('services.paypal_live.secret')
|
||||
);
|
||||
|
||||
|
||||
// $this->_apiContext->setConfig(array(
|
||||
// 'mode' => 'sandbox',
|
||||
// 'service.EndPoint' => 'https://api.sandbox.paypal.com',
|
||||
// 'http.ConnectionTimeOut' => 30,
|
||||
// 'log.LogEnabled' => true,
|
||||
// 'log.FileName' => storage_path('logs/paypal.log'),
|
||||
// 'log.LogLevel' => 'FINE'
|
||||
// ));
|
||||
|
||||
// live
|
||||
$this->_apiContext->setConfig(array(
|
||||
'mode' => 'live',
|
||||
'service.EndPoint' => 'https://api.paypal.com',
|
||||
$this->_apiContext->setConfig(array(
|
||||
'mode' => $paypal_env,
|
||||
'service.EndPoint' => $paypal_apiUrl,
|
||||
'http.ConnectionTimeOut' => 30,
|
||||
'log.LogEnabled' => true,
|
||||
'log.FileName' => storage_path('logs/paypal.log'),
|
||||
'log.LogLevel' => 'FINE'
|
||||
));
|
||||
));
|
||||
|
||||
// live
|
||||
// $this->_apiContext->setConfig(array(
|
||||
// 'mode' => 'sandbox',
|
||||
// 'service.EndPoint' => 'https://api.paypal.com',
|
||||
// 'http.ConnectionTimeOut' => 30,
|
||||
// 'log.LogEnabled' => true,
|
||||
// 'log.FileName' => storage_path('logs/paypal.log'),
|
||||
// 'log.LogLevel' => 'FINE'
|
||||
// ));
|
||||
}
|
||||
|
||||
|
||||
@@ -385,8 +398,8 @@ class PaypalController extends Controller
|
||||
);
|
||||
|
||||
Mail::send('emails.orders', $data, function ($message) use ($data) {
|
||||
$message->from('no-reply@crewsportswear.com', 'CREW Sportswear');
|
||||
$message->bcc($data['email_cc'], 'Orders From CREW Sportswear');
|
||||
$message->from('no-reply@crewsportswear.com', 'Merchbay');
|
||||
$message->bcc($data['email_cc'], 'Orders From Merchbay');
|
||||
$message->to($data['receiver'])->subject($data['subject']);
|
||||
});
|
||||
// end email sending
|
||||
|
||||
@@ -621,7 +621,7 @@ class TeamStoreController extends Controller
|
||||
$finalSubTotal = $getSubtotal[0]->Subtotal;
|
||||
}
|
||||
|
||||
return view('sublayouts.cart')
|
||||
return view('merchbay.cart')
|
||||
->with('item_group', $items_group)
|
||||
->with('row', $items)
|
||||
->with('img_thumb', $item_thumbs)
|
||||
@@ -725,8 +725,6 @@ class TeamStoreController extends Controller
|
||||
$offData = $getVoucher[0]->VoucherValue . ' ' . $store_array[0]->StoreCurrency;
|
||||
}
|
||||
|
||||
|
||||
|
||||
$message = '<div class="btn-group">
|
||||
<button type="button" class="btn btn-default btn-xs">' . $getVoucher[0]->VoucherCode . ' ' . $offData . ' OFF</button>
|
||||
<button type="button" class="btn btn-default dropdown-toggle btn-xs" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
|
||||
Reference in New Issue
Block a user