library pma-fulfillment
Allows you to connect easily to PMA and send items to ship.
frankperez87/pma-fulfillment
Allows you to connect easily to PMA and send items to ship.
- Wednesday, January 6, 2016
- by frankperez87
- Repository
- 1 Watchers
- 0 Stars
- 16 Installations
- PHP
- 0 Dependents
- 0 Suggesters
- 1 Forks
- 1 Open issues
- 7 Versions
- 0 % Grown
PMA Fulfillment API
This is an unofficial API for PMA., (*1)
Install via Composer
composer require frankperez87/pma-fulfillment
Use Example:
setTransactionNumber('TEST123');
//$order->setEmail(''); // Optional
$order->setOrderDate('01-01-2015');
//$order->setCustomerNumber(''); // Optional
$order->setOrderType('BULK');
$order->setPaymentAmount(11.08);
$order->setShippingAmount(2.50);
$order->setTaxAmount(2.59);
$order->setSourceCode('Internet');
$order->setSource('Internet');
// Add Products
$order->addProduct(new Product('PROD123', 1, 5.99));
// Instantiate Shipping Class
$shipping = new ShippingAddress();
//$shipping->setAttn('Test'); Optional
$shipping->setFirstName('Frank');
$shipping->setLastName('Test'); // Optional
$shipping->setAddressOne('123 Main Street');
//$shipping->setAddressTwo(''); // Optional
$shipping->setCity('Davie');
$shipping->setState('FL');
$shipping->setZip('33314');
$shipping->setCountry('USA');
//$shipping->setPhoneNumber(''); // Optional
$shipping->setAddressType('RESIDENTIAL');
$shipping->setShipMethod('UPSMI');
// Instantiate Shipping Class
$billing = new BillingAddress();
$billing->setFirstName('Frank');
$billing->setLastName('Test'); // Optional
$billing->setAddressOne('123 Main Street');
//$billing->setAddressTwo(''); // Optional
$billing->setCity('Davie');
$billing->setState('FL');
$billing->setZip('33314');
$billing->setCountry('USA');
// Add Shipping and Billing Objects to Order
$order->addShippingAddress($shipping);
$order->addBillingAddress($billing);
$pma = new PMA($account);
$pma->setOrder($order);
$response = $pma->send();
} catch(InvalidArgumentException $e) {
echo $e->getMessage(); // Outputs any errors returned
}
?>
dev-master
9999999-dev
Allows you to connect easily to PMA and send items to ship.
Sources
Download
MIT
The Requires
The Development Requires
v1.0.5
1.0.5.0
Allows you to connect easily to PMA and send items to ship.
Sources
Download
MIT
The Requires
The Development Requires
v1.0.4
1.0.4.0
Allows you to connect easily to PMA and send items to ship.
Sources
Download
MIT
The Requires
The Development Requires
v1.0.3
1.0.3.0
Allows you to connect easily to PMA and send items to ship.
Sources
Download
MIT
The Requires
The Development Requires
v1.0.2
1.0.2.0
Allows you to connect easily to PMA and send items to ship.
Sources
Download
MIT
The Requires
The Development Requires
v1.0.1
1.0.1.0
Allows you to connect easily to PMA and send items to ship.
Sources
Download
MIT
The Requires
The Development Requires
v1.0.0
1.0.0.0
Allows you to connect easily to PMA and send items to ship.
Sources
Download
MIT
The Requires
The Development Requires