Version 4.1.2
This commit is contained in:
1 parent
3ba79295ee
commit
28bd025b35
1131 files changed
+63658
-20579
No files matched your search
@@ -40,12 +40,15 @@ class _EasyPostRate implements \IPS\nexus\Shipping\Rate
|
||||
}
|
||||
|
||||
/**
|
||||
* Is available to destination?
|
||||
* Is available?
|
||||
*
|
||||
* @param \IPS\GeoLocation $destination Desired destination
|
||||
* @param \IPS\GeoLocation $destination Desired destination
|
||||
* @param array $items Items
|
||||
* @param string $currency Desired currency
|
||||
* @param \IPS\nexus\Invoice|NULL $invoice The invoice
|
||||
* @return bool
|
||||
*/
|
||||
public function isAvailable( \IPS\GeoLocation $destination )
|
||||
public function isAvailable( \IPS\GeoLocation $destination, array $items, $currency, \IPS\nexus\Invoice $invoice = NULL )
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
@@ -141,7 +144,7 @@ class _EasyPostRate implements \IPS\nexus\Shipping\Rate
|
||||
*/
|
||||
public static function getRates( $lengthInInches, $widthInInches, $heightInInches, $weightInOz, \IPS\nexus\Customer $toCustomer, \IPS\Geolocation $toAddress, $currency )
|
||||
{
|
||||
$fromAddress = \IPS\GeoLocation::buildFromJson( \IPS\Settings::i()->site_address );
|
||||
$fromAddress = \IPS\GeoLocation::buildFromJson( \IPS\Settings::i()->easypost_address ?: \IPS\Settings::i()->site_address );
|
||||
|
||||
return \IPS\Http\Url::external( 'https://api.easypost.com/v2/shipments' )->request()->login( \IPS\Settings::i()->easypost_api_key, '' )->post( array( 'shipment' => array(
|
||||
'to_address' => array(
|
||||
|
||||
Reference in new issue
Block a user