-
Ahoj, $pocet_stitku = 2; chyba: můžete mě prosím trochu nakopnout, kde dělám chybu? Díky |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Je to napsane primo v te error message, 15 argument Zhruba nejak takhle: use Salamek\PplMyApi\Model\PackageSet;
use Salamek\PplMyApi\Model\Package;
$mainPackageNumber = 'MAIN_PACKAGE_NUMBER';
$packageSet = new PackageSet($mainPackageNumber, 1, 2); // For constructor parameters see https://github.com/Salamek/PplMyApi/blob/master/src/Model/PackageSet.php
$package = new Package($mainPackageNumber, Product::PPL_PARCEL_CZ_PRIVATE, 'Testovaci balik', $recipient, $cityRouting, null, null, null, null, [], [], [], null, null, $packageSet);
$packageSet->setPackagePosition(2);
$package2 = new Package($packageNumber2, Product::PPL_PARCEL_CZ_PRIVATE, 'Testovaci balik2', $recipient, $cityRouting, null, null, null, null, [], [], [], null, null, $packageSet);
try
{
$pplMyApi->createPackages([$package, $package2]);
}
catch (\Exception $e)
{
echo $e->getMessage() . PHP_EOL;
} |
Beta Was this translation helpful? Give feedback.
Je to napsane primo v te error message, 15 argument
Salamek\PplMyApi\Model\Package::__construct()
je typuSalamek\PplMyApi\Model\IPackageSet
a vy tam davateint
...Zhruba nejak takhle: