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

Stored procedure PHP - can't make another statement afterwards
phpWhois script not getting complete data from Godaddy
ConnectWise Rest API
array_filter leaves one 0 and one null
I want to make a notification error if one of field is empty
Change text in mini cart and wishlist buttons on header
Increase Mysql/PHP Query Speed
Laravel How to overload environment values dynamically
iteration variable inside for changing its value
Change caret icon each time while loop goes through
Image Intervention w/ Laravel 5.4 Storage
How to do a php validation check for an input outside of a form
update fields of a 'pass and confirm' form
Yii2 ActiveForm field widgets not posting values to the model
SOAP-ERROR: Failed to load external entity error on SOAP using PHP
PHP CI load .html file

Categories

HOME
xpath
flask
events
powerbi
scroll
dry
histogram
portable-class-library
cryptography
google-webmaster-tools
google-sheets-query
vue-resource
share
firebase-database
telegraf
jpa-criteria
sharepoint-online
mutation-testing
swarm
fireloop
csrf
mailmerge
feature-extraction
mpu6050
mailgun
global-variables
nest-api
google-sites
bazaar
parceler
pubxml
msdeploy
miniprofiler
bobo-browse.net
ninject
universal
rspec-rails
cloveretl
markov-chains
nsuserdefaults
robust
julius-speech
realstudio
cloudwatch
jgrapht
amazon-elastic-beanstalk
renderman
extjs4.1
webvtt
android-mediarecorder
sesame
zend-server
hmmlearn
rational-performance-test
bigdecimal
java-2d
msg
zynq
qpixmap
vaadin4spring
gridbaglayout
openmrs
django-validation
miniconda
swagger-maven-plugin
android-handler
mobilefirst-server
com0com
dbmigrate
whitespace-language
innerhtml
mxe
sql-processor
sunos
producer
category-theory
cidr
tabletools
jomsocial
lync-2010
strdup
illuminate-container
grails-2.3
sql-view
insertonsubmit
apportable
ldif
insertion
significant-digits
spark-view-engine
pageheap
opends
fbml
will-paginate
regression-testing
bass
uninstaller
j2mepolish
self-tracking-entities
aspbutton
facebook-fbml
google-translator-toolkit

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