-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
76 additions
and
2 deletions.
There are no files selected for viewing
63 changes: 63 additions & 0 deletions
63
packages/Nicelizhi/OneBuy/src/Console/Commands/Paypal/OrderGet.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
<?php | ||
namespace Nicelizhi\OneBuy\Console\Commands\Paypal; | ||
|
||
use Exception; | ||
use Illuminate\Console\Command; | ||
use GuzzleHttp\Client; | ||
use Illuminate\Support\Facades\Log; | ||
use Illuminate\Support\Facades\Redis; | ||
use Maatwebsite\Excel\Facades\Excel; | ||
use Webkul\Sales\Repositories\OrderRepository; | ||
use Webkul\Checkout\Repositories\CartRepository; | ||
use Webkul\Checkout\Facades\Cart; | ||
use Webkul\Paypal\Payment\SmartButton; | ||
|
||
class OrderGet extends Command | ||
{ | ||
/** | ||
* The name and signature of the console command. | ||
* | ||
* @var string | ||
*/ | ||
protected $signature = 'onebuy:paypal:order:get'; | ||
|
||
/** | ||
* The console command description. | ||
* | ||
* @var string | ||
*/ | ||
protected $description = 'paypal order'; | ||
|
||
/** | ||
* Create a new command instance. | ||
* | ||
* @return void | ||
*/ | ||
public function __construct( | ||
protected SmartButton $smartButton, | ||
protected OrderRepository $orderRepository, | ||
protected CartRepository $cartRepository | ||
) | ||
{ | ||
parent::__construct(); | ||
} | ||
|
||
private $cache_key = "faq"; | ||
|
||
private $cart; | ||
|
||
/** | ||
* Execute the console command. | ||
* | ||
* @return mixed | ||
*/ | ||
public function handle() | ||
{ | ||
$orderID = "5JK60257HG619343A"; | ||
|
||
$order = $this->smartButton->getOrder($orderID); | ||
|
||
var_dump($order); | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters