Repository navigation
v1.5.0
Caller-supplied reference ids, and transfer and refund statuses that no longer
warn. Anyone who retries writes after a timeout or 5xx should upgrade: with a
random id, a lost response could not be queried and a retry could pay twice.
Added
- Write methods take an optional caller-supplied id:
$referenceIdon MTN
requestToPay(),quickPay(),deposit(),transfer()andrefund()
(sent asX-Reference-Id),$transactionIdon AirtelrequestToPay()and
transfer()(sent astransaction.id). The id is returned and is what the
status methods take, so after a timeout or 5xx you can query a payment whose
response you never saw, and retry with the same id instead of risking a second
payment (#22). It must be a
UUID; anything else throws anInvalidArgumentExceptionbefore a request is
sent. Omitting it keeps the random UUID, so existing code is unaffected Uuid::assert()to check a value is a UUID
Fixed
- Reading the status of a transfer or refund raised
Undefined array key
warnings. MTN leavespayerMessageandpayeeNoteout of those bodies, and
Transaction::parse()read them unguarded; under an error handler that turns
warnings into exceptions, the status call threw. MissingexternalId,
amount,payerMessageandpayeeNotenow parse asnull