Giter Club home page Giter Club logo

laravel-aramex-sdk's People

Contributors

mouadaarab avatar moustafa22 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

laravel-aramex-sdk's Issues

SoapClient not found in AramexHelper.php

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

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": ""
                    }
                },

install issue

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

Could not connect to host

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

Add fields to calculate rate

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

Adding Multiple Items

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.

Screen Shot 2022-10-27 at 3 13 01 AM

Thanks! and keep it up!

OriginAddress - Invalid zip code ()

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 ()"
}
}

Handle exception

I'm using try catch to show the error to user, but I cannot decode the message as json, any idea how to show the error to user?

image

SDK methods

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?

installing the SDK

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 [].

SOAP-ERROR: Parsing WSDL

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

City name is invalid (Dubai)

octaw issue

{#990
+"error": 1
+"errors": {#986
+"Notification": array:2 [
0 => {#987
+"Code": "ERR52"
+"Message": "OriginAddress - City name is invalid (Dubai)"
}
1 => {#988
+"Code": "ERR52"
+"Message": "DestinationAddress - City name is invalid (Dubai)"
}
]
}
}

Undefined property: stdClass::$ProcessedShipment

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; }

Zip code

Hi there
Most of the coutries shows error because of zip code but 100% sure that this zip code is correct

Any idea please

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.