php


Laravel - FexEd shipment request API responce ERROR


I have faced the following error when I integrate FedEx shipment API with Laravel. I use this package for it - https://github.com/JeremyDunn/php-fedex-api-wrapper
If anyone knows how to create shipment request with FedEx API, so please help me to resolve this issues, I have sow this type error message "Action type TRANSFER is not allowed for this request." with error code 3630.
I have also added my response output code so you all are understood very well
my Laravel Code
$userCredential = new \FedEx\ShipService\ComplexType\WebAuthenticationCredential();
$userCredential
->setKey('NCimB3Bq5GtxAQx7')
->setPassword('Zr1Bb3P1pjYtz0miXdIjut2OW');
$webAuthenticationDetail = new \FedEx\ShipService\ComplexType\WebAuthenticationDetail();
$webAuthenticationDetail->setUserCredential($userCredential);
$clientDetail = new \FedEx\ShipService\ComplexType\ClientDetail();
$clientDetail
->setAccountNumber('510087160')
->setMeterNumber('118814986');
$version = new \FedEx\ShipService\ComplexType\VersionId();
$version
->setMajor(12)
->setIntermediate(1)
->setMinor(0)
->setServiceId('ship');
$shipperAddress = new \FedEx\ShipService\ComplexType\Address();
$shipperAddress
->setStreetLines(array(
'1202 Chalet Ln',
'Do Not Delete - Test Account'
))
->setCity('Harrison')
->setStateOrProvinceCode('AR')
->setPostalCode('72601')
->setCountryCode('US');
$shipperContact = new \FedEx\ShipService\ComplexType\Contact();
$shipperContact
->setCompanyName('Company Name')
->setEMailAddress('test#example.com')
->setPersonName('Person Name')
->setPhoneNumber(('123-123-1234'));
$shipper = new \FedEx\ShipService\ComplexType\Party();
$shipper
->setAccountNumber('510087020')
->setAddress($shipperAddress)
->setContact($shipperContact);
$recipientAddress = new \FedEx\ShipService\ComplexType\Address();
$recipientAddress
->setStreetLines(array('54312 1st Ave'))
->setCity('Anytown')
->setStateOrProvinceCode('NY')
->setPostalCode('12345')
->setCountryCode('US');
$recipientContact = new \FedEx\ShipService\ComplexType\Contact();
$recipientContact
->setPersonName('Contact Name');
$recipient = new \FedEx\ShipService\ComplexType\Party();
$recipient
->setAddress($recipientAddress)
->setContact($recipientContact);
$labelSpecification = new \FedEx\ShipService\ComplexType\LabelSpecification();
$labelSpecification
->setLabelStockType(new \FedEx\ShipService\SimpleType\LabelStockType(\FedEx\ShipService\SimpleType\LabelStockType::_PAPER_7X4point75))
->setImageType(new \FedEx\ShipService\SimpleType\ShippingDocumentImageType(\FedEx\ShipService\SimpleType\ShippingDocumentImageType::_PDF))
->setLabelFormatType(new \FedEx\ShipService\SimpleType\LabelFormatType(\FedEx\ShipService\SimpleType\LabelFormatType::_COMMON2D));
$requestedShipment = new \FedEx\ShipService\ComplexType\RequestedShipment();
$requestedShipment->setShipTimestamp(date('c'));
$requestedShipment->setDropoffType(new \FedEx\ShipService\SimpleType\DropoffType(\FedEx\ShipService\SimpleType\DropoffType::_REGULAR_PICKUP));
$requestedShipment->setServiceType(new \FedEx\ShipService\SimpleType\ServiceType(\FedEx\ShipService\SimpleType\ServiceType::_FEDEX_GROUND));
$requestedShipment->setPackagingType(new \FedEx\ShipService\SimpleType\PackagingType(\FedEx\ShipService\SimpleType\PackagingType::_FEDEX_BOX));
$requestedShipment->setShipper($shipper);
$requestedShipment->setRecipient($recipient);
$requestedShipment->setLabelSpecification($labelSpecification);
$requestedShipment->setRateRequestTypes(array(new \FedEx\ShipService\SimpleType\RateRequestType(\FedEx\ShipService\SimpleType\RateRequestType::_ACCOUNT)));
$requestedShipment->setPackageCount(2);
$createPendingShipmentRequest = new \FedEx\ShipService\ComplexType\CreatePendingShipmentRequest();
// dd($webAuthenticationDetail::_NAME);
$createPendingShipmentRequest->setWebAuthenticationDetail($webAuthenticationDetail);
$createPendingShipmentRequest->setClientDetail($clientDetail);
$createPendingShipmentRequest->setVersion($version);
$createPendingShipmentRequest->setRequestedShipment($requestedShipment);
// dd($createPendingShipmentRequest);
$shipService = new \FedEx\ShipService\Request();
$shipService->getSoapClient()->__setLocation('https://wsbeta.fedex.com/web-services/ship');
$result = $shipService->getCreatePendingShipmentReply($createPendingShipmentRequest);
dd($result);
My Responce output
{#389 ▼
+"HighestSeverity": "ERROR"
+"Notifications": array:2 [▼
0 => {#390 ▼
+"Severity": "ERROR"
+"Source": "ship"
+"Code": "3630"
+"Message": "Action type TRANSFER is not allowed for this request."
+"LocalizedMessage": "Action type TRANSFER is not allowed for this request."
+"MessageParameters": {#391 ▼
+"Id": "ACTION"
+"Value": "TRANSFER"
}
}
1 => {#392 ▼
+"Severity": "ERROR"
+"Source": "ship"
+"Code": "2021"
+"Message": "Invalid package count or invalid package sequence number."
+"LocalizedMessage": "Invalid package count or invalid package sequence number."
}
]
+"Version": {#393 ▼
+"ServiceId": "ship"
+"Major": 12
+"Intermediate": 1
+"Minor": 0
}
}

Related Links

mysql data retrieving in multiple tables
wordpress footer.php - Parse error: syntax error, unexpected $end
How to convert mysql to mysqli database connection in the constructor
How to check the inputted date in the form is in yyyy-mm-dd format or not in core php? [duplicate]
special character from array is not working in csv file using php
Replace symbol with preg_replace
Replacing text inside html tags using php curl
Save photo to SQLite database and have PHP read it and display it
Pods - display link to relationship post
Add new context variables to lithium\template\view\adapter\File
How to unit test file_put_contents() with file read/write permitions
How to decrypt password in Laravel 4 when selecting a record from the database using the Eloquent Model Class?
Find subarray in multidimensional array
yii:how to run a function before run submitbutton
WordPress mouse over select option
modify json response in php?

Categories

HOME
android-studio
gaming
functional-programming
eclipse-plugin
seedstack
postgresql-9.4
mousemove
braintree
semantic-web
elk-stack
turbojpeg
angular2-template
specifications
mailing-list
lapack
documentum
orc
stimulsoft
jpa-2.0
global-variables
pinterest
gravity
word2vec
tfsbuild
significance
spring-ldap
generator
qa
network-analysis
oracleforms
locks
d3.js-v4
publishing
memory-fences
stackpanel
ms-solver-foundation
djcelery
mv
iscroll
stat
yoast
elasticsearch-aggregation
fluid-mac-app-engine
oracle-bmcs
nomad
code-push
jshint
kitura
rightnow-crm
dredd
spring.net
emf-compare
sidewaffle
email-injection
cefpython
google-identity-toolkit
dcount
dmarc
mathml
groovyfx
i2b2
taco
okta-api
vim-plugin
json-spirit
knife
css-paged-media
360-degrees
swagger-maven-plugin
google-gdk
ssmtp
createfile
fat32
cakephp-2.2
dc
wicket-1.5
libgcc
webmethod
communicate
sqlbindparameter
wso2bam
flipboard
lync-2010
spring-security-acl
xsd2code
mute
yii-booster
disjoint-union
lru
ax
jquery-lazyload
ui-design
ofstream
donut-chart
proc-open
contextswitchdeadlock
system-requirements
cgrectmake
jquery-dialog
zotonic
uploading
gwt-celltable
django-apps
asio
nsrangeexception
kohana-auth
webresponse
formal-semantics
j2mepolish
cleartype
browser-based
.net-client-profile
inversion
remote-working
synthesizer

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App