Tie Parcel2Go shipping to pending Etsy orders
Deploy HickLab3D Dashboard / Deploy to production (push) Successful in 26s
Deploy HickLab3D Dashboard / Deploy to production (push) Successful in 26s
This commit is contained in:
@@ -47,11 +47,11 @@ class DashboardController extends Controller
|
||||
if ($isAdmin && filled($shippingConfig['client_id'] ?? null) && filled($shippingConfig['client_secret'] ?? null) && filled($shippingConfig['auth_url'] ?? null)) {
|
||||
try {
|
||||
$parcel2Go->verifyCredentials();
|
||||
if ($parcel2Go->hasScope('my-profile')) {
|
||||
try {
|
||||
$shipments = array_slice($parcel2Go->fetch('me/orders/detail')['Orders'] ?? [], 0, 4);
|
||||
$shippingStatus = 'Live account';
|
||||
} else {
|
||||
$shippingStatus = 'Quotes available';
|
||||
} catch (Throwable $exception) {
|
||||
$shippingStatus = 'History access needed';
|
||||
}
|
||||
} catch (Throwable $exception) {
|
||||
report($exception);
|
||||
|
||||
Reference in New Issue
Block a user