moustafa22 / laravel-aramex-sdk Goto Github PK
View Code? Open in Web Editor NEWAramex open source Laravel SDK to integrate with Aramex API's
License: MIT License
Aramex open source Laravel SDK to integrate with Aramex API's
License: MIT License
Hi , i have installed the package and enabled the soap extension in php.ini file but when i tried to create shipment by this code $callResponse = Aramex::createShipment([
'shipper' => [
'name' => 'Steve',
'email' => '[email protected]',
'phone' => '+123456789982',
'cell_phone' => '+321654987789',
'country_code' => 'US',
'city' => 'New York',
'zip_code' => 32160,
'line1' => 'Line1 Details',
'line2' => 'Line2 Details',
'line3' => 'Line3 Details',
],
'consignee' => [
'name' => 'Steve',
'email' => '[email protected]',
'phone' => '+123456789982',
'cell_phone' => '+321654987789',
'country_code' => 'US',
'city' => 'New York',
'zip_code' => 32160,
'line1' => 'Line1 Details',
'line2' => 'Line2 Details',
'line3' => 'Line3 Details',
],
'shipping_date_time' => time() + 50000,
'due_date' => time() + 60000,
'comments' => 'No Comment',
'pickup_location' => 'at reception',
// 'pickup_guid' => $guid,
'weight' => 1,
'number_of_pieces' => 1,
'description' => 'Goods Description, like Boxes of flowers',
]);
if (!empty($callResponse->error)) {
foreach ($callResponse->errors as $errorObject) {
handleError($errorObject->Code, $errorObject->Message);
}
} else {
} i get this error Error: Class "SoapClient" not found in file C:\Users\ThinkCentre\Desktop\Last\vendor\octw\aramex\src\Helpers\AramexHelper.php on line 285
Third party shipment Creation seems to be missing as we have option for this in the Aramex API.
"ThirdParty": {
"Reference1": "",
"Reference2": "",
"AccountNumber": "",
"PartyAddress": {
"Line1": "",
"Line2": "",
"Line3": "",
"City": "",
"StateOrProvinceCode": "",
"PostCode": "",
"CountryCode": "",
"Longitude": 0,
"Latitude": 0,
"BuildingNumber": null,
"BuildingName": null,
"Floor": null,
"Apartment": null,
"POBox": null,
"Description": null
},
"Contact": {
"Department": "",
"PersonName": "",
"Title": "",
"CompanyName": "",
"PhoneNumber1": "",
"PhoneNumber1Ext": "",
"PhoneNumber2": "",
"PhoneNumber2Ext": "",
"FaxNumber": "",
"CellPhone": "",
"EmailAddress": "",
"Type": ""
}
},
Nothing to install or update
Writing lock file
Generating optimized autoload files
Illuminate\Foundation\ComposerScripts::postAutoloadDump
@php artisan package:discover --ansi
In ProviderRepository.php line 208:
Class 'octw\aramex\src\AramexServiceProvider' not found
Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 1
when i try any function i got Could not connect to host
here is my code for example
public function validate_address(){
$address=[
'line1'=>'line1',// recommended no required,
'country_code'=>'AE',
'city'=>'Dubai'
];
$data = Aramex::validateAddress($address);
dd($data);
}
NOTE1 : when i try to upload on server it is working fine but in my local device it give me Could not connect to host
NOTE2 : i'm using test env
Hello,
thanks for the great package.
Is it possible to add the shipment dimensions to the shipment details in the calculateRate method ? I'm trying to match the website calculator in my integration:
https://www.aramex.com/ar/en/ship/check-shipping-rates
This is the part I want to add:
$details->Dimensions = new \stdClass;
$details->Dimensions->Length = $shipmentDetails['length'];
$details->Dimensions->Width = $shipmentDetails['width'];
$details->Dimensions->Height = $shipmentDetails['height'];
$details->Dimensions->Unit = 'CM';
Thanks in advance
Hello!
Great Package!
Quick question, is there a way to add multiple items to the requests being sent? (currently working on the rate calculation)?
From what I see in the WDSL file, you can expose an "items" array which can accept array of items, and each item can have its own length, width, height etc...
From what I see, the only way to add multiple items is to send multiple requests, and this returns a big amount of shipping cost, on Aramex's website, you can simply add multiple items with multiple dimensions and the cost will be reduced a lot.
Thanks! and keep it up!
Hello Mustafa!
i am faceing this response form the server please guide me how can i fix it here is array which i am using for address purposes
$originAddress = [
'line1' => '9745 Touchton Road, Unit-3101 Jacksonville, Florida 32246',
'city' => 'Jacksonville',
'country_code' => 'US',
];
$destinationAddress = [
'line1' => 'Test String',
'city' => 'Dubai',
'country_code' => 'AE'
];
********************* Response ***********************
{#460
+"Notification": {#464
+"Code": "ERR52"
+"Message": "OriginAddress - Invalid zip code ()"
}
}
SDK Method - createShipment:
While using the Aramex SDK, I have come across the createShipment method. I would like clarification on the roles of the shipper and consignee in this context. Specifically:
Is the shipper typically the seller's address, or does it refer to another entity?
Similarly, who is considered the consignee? Is it the buyer's address, or is there a different definition?
SDK Method - calculateRate:
In the calculateRate method of the Aramex SDK, I am uncertain about the meaning of the originAddress. Could you please clarify whether this should be the seller's address or if it refers to an Aramex-specific location?
When I use the second command that makes the aramex.php config file and publishes in the vendor, this error appears
Command : php artisan vendor:publish --provider="Octw\Aramex\AramexServiceProvider"
error : INFO No publishable resources for tag [].
Hi,
I get this error after call any method:
SOAP-ERROR: Parsing WSDL: Couldn't load from '/home/wiiw4sdu6lut/public_html/vendor/octw/aramex/src/Helpers/../../wsdls/test/shipping.xml' : failed to load external entity "/home/wiiw4sdu6lut/public_html/vendor/octw/aramex/src/Helpers/../../wsdls/test/shipping.xml"
i checked the SOAP extension and it's enabled in my server
Hi
i get this error :
Undefined property: stdClass::$ProcessedShipment
when call (createShipment)
$callResponse = Aramex::createShipment([ 'shipper' => [ 'name' => 'Steve', 'email' => '[email protected]', 'phone' => '+123456789982', 'cell_phone' => '+321654987789', 'country_code' => 'Jo', 'city' => 'Amman', 'zip_code' => '', 'line1' => 'Mecca St', 'line2' => 'Line2 Details', 'line3' => 'Line3 Details', ], 'consignee' => [ 'name' => 'Steve', 'email' => '[email protected]', 'phone' => '+123456789982', 'cell_phone' => '+321654987789', 'country_code' => 'AE', 'city' => 'Dubai', 'zip_code' => '', 'line1' => '15 ABC St', 'line2' => 'Line2 Details', 'line3' => 'Line3 Details', ], 'shipping_date_time' => time(), 'due_date' => time(), 'comments' => 'No Comment', 'pickup_location' => 'at reception', 'pickup_guid' => '', 'weight' => 1, 'number_of_pieces' => 1, 'description' => 'Goods Description, like Boxes of flowers', ]); if (!empty($callResponse->error)) { foreach ($callResponse->errors as $errorObject) { handleError($errorObject->Code, $errorObject->Message); } } else { // extract your data here, for example // $shipmentId = $response->Shipments->ProcessedShipment->ID; // $labelUrl = $response->Shipments->ProcessedShipment->ShipmentLabel->LabelURL; }
Hi there
Most of the coutries shows error because of zip code but 100% sure that this zip code is correct
Any idea please
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.