Purchase Stamps.com Postage¶
Purchase postage:
<?php
$s = new \RocketShipIt\Carrier\Stamps;
$resp = $s->purchasePostage(10.00);
Example error response:
stdClass Object
(
[Authenticator] => exp=1465021666&uid=2736972&cty=swsim&ctk=sY+uyjAPvbFnJZGouxbtRd/XE=&iid=g949blZRUuaUT+DAW/Ygw==&rsid=0&irsid=3&ec=0&eacx=0&eac3=0&rrsid=0&raid=0&resellerid=0&pexp=0&pl=214748647&ast=1&ipaddr=101.170.255.117&ace=146538866&mac=FtMR3ldR4JYfv46GfIhGEOmo=
[PurchaseStatus] => Rejected
[TransactionID] => 0
[PostageBalance] => stdClass Object
(
[AvailablePostage] => 497.9300
[ControlTotal] => 770.00
)
[RejectionReason] => The total amount of postage in your account cannot exceed $500.00
[MIRequired] =>
)
Example success response:
stdClass Object
(
[Authenticator] => exp=1465021666&uid=2736972&cty=swsim&ctk=sY+uyjAPvbFnJZGouxbtRd/XE=&iid=g949blZRUuaUT+DAW/Ygw==&rsid=0&irsid=3&ec=0&eacx=0&eac3=0&rrsid=0&raid=0&resellerid=0&pexp=0&pl=214748647&ast=1&ipaddr=101.170.255.117&ace=146538866&mac=FtMR3ldR4JYfv46GfIhGEOmo=
[PurchaseStatus] => Success
[TransactionID] => 69611709
[PostageBalance] => stdClass Object
(
[AvailablePostage] => 485.7600
[ControlTotal] => 780.00
)
[MIRequired] =>
)