-
Notifications
You must be signed in to change notification settings - Fork 3
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
2 changed files
with
62 additions
and
7 deletions.
There are no files selected for viewing
41 changes: 41 additions & 0 deletions
41
app/GraphQL/Souk/Mutations/Orders/DraftOrderManagementMutation.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,41 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace App\GraphQL\Souk\Mutations\Orders; | ||
|
||
use Kanvas\Apps\Models\Apps; | ||
use Kanvas\Guild\Customers\Enums\ContactTypeEnum; | ||
use Kanvas\Inventory\Variants\Models\Variants; | ||
use Kanvas\Social\Interactions\Actions\CreateInteraction; | ||
use Kanvas\Social\Interactions\Actions\CreateUserInteractionAction; | ||
use Kanvas\Social\Interactions\DataTransferObject\Interaction; | ||
use Kanvas\Social\Interactions\DataTransferObject\UserInteraction; | ||
use Kanvas\Souk\Orders\DataTransferObject\DirectOrder; | ||
use Kanvas\Souk\Payments\DataTransferObject\CreditCard; | ||
use Kanvas\Souk\Payments\Providers\AuthorizeNetPaymentProcessor; | ||
|
||
class DraftOrderManagementMutation | ||
{ | ||
public function create(mixed $root, array $request): array | ||
{ | ||
$user = auth()->user(); | ||
|
||
print_R($request); | ||
$customer = $request['input']['customer']; | ||
$customer['contacts'] = [ | ||
[ | ||
'contact' => $request['input']['email'], | ||
'contacts_types_id' => ContactTypeEnum::EMAIL->value, | ||
'weight' => 0 | ||
] | ||
]; | ||
|
||
print_r($customer); die(); | ||
|
||
|
||
return []; | ||
} | ||
|
||
|
||
} |
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