You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It is a trivial exercise to handle the extra field in wallet_purchase by modifying wallet_purchase, as follows:
public function wallet_purchase($amount, $reference, $wallet, $currency = "AUD", $extra = null, $metadata = null, $addendum_data = null)
and by adding: if (!is_null($extra)) $payload["extra"] = $extra; if (!is_null($metadata)) $payload["metadata"] = $metadata; if (!is_null($addendum_data)) $payload["addendum_data"] = $addendum_data;
and finish it off by updating the function documentation by adding the following line: * @param array<string,string> $extra an assoc. array of extra params to merge into the request * @param array<string,string> $metadata an assoc. array of metadata params to merge into the request * @param array<string,string> $addendum_data an assoc. array of addendum_data params to merge into the request
The text was updated successfully, but these errors were encountered:
RichardDale
changed the title
Handle extra field in wallet_purchase
Handle metadata, extra, addendum_data in wallet_purchase
Jan 7, 2021
It is a trivial exercise to handle the extra field in wallet_purchase by modifying wallet_purchase, as follows:
public function wallet_purchase($amount, $reference, $wallet, $currency = "AUD", $extra = null, $metadata = null, $addendum_data = null)
and by adding:
if (!is_null($extra)) $payload["extra"] = $extra;
if (!is_null($metadata)) $payload["metadata"] = $metadata;
if (!is_null($addendum_data)) $payload["addendum_data"] = $addendum_data;
and finish it off by updating the function documentation by adding the following line:
* @param array<string,string> $extra an assoc. array of extra params to merge into the request
* @param array<string,string> $metadata an assoc. array of metadata params to merge into the request
* @param array<string,string> $addendum_data an assoc. array of addendum_data params to merge into the request
The text was updated successfully, but these errors were encountered: