We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I am trying to implement it via PHP way:
Steps to reproduce:
a) composer require tiamo/phpas2
b) Now create an index.php file with below code:
<?php require_once 'vendor/autoload.php'; $manager = new \AS2\Management(); //loading conf files $partners = require 'config/partners.php'; /** @var /AS2/MessageRepositoryInterface $messageRepository */ $messageRepository = new App\Repositories\MessageRepository(['path' => $storagePath . DIRECTORY_SEPARATOR . 'sent']); /** @var /AS2/PartnerRepositoryInterface $partnerRepository */ $partnerRepository = new App\Repositories\PartnerRepository($partners); // Init partners $sender = $partnerRepository->findPartnerById('A'); $receiver = $partnerRepository->findPartnerById('B'); // Generate new message ID $messageId = \AS2\Utils::generateMessageID($sender); $rawMessage = ' Content-type: Application/EDI-X12 Content-disposition: attachment; filename=payload Content-id: <[email protected]> ISA*00~'; // Init new Message $message = $messageRepository->createMessage(); $message->setMessageId($messageId); $message->setSender($sender); $message->setReceiver($receiver); $payload = $manager->buildMessage($message, $rawMessage); if ($response = $manager->sendMessage($message, $payload)) { echo "OK \n"; } $messageRepository->saveMessage($message);
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I am trying to implement it via PHP way:
Steps to reproduce:
a) composer require tiamo/phpas2
b) Now create an index.php file with below code:
The text was updated successfully, but these errors were encountered: