28 if (!isset($subject[
'payment'])
31 throw new \InvalidArgumentException(
'Payment data object should be provided');
34 return $subject[
'payment'];
45 if (!isset($subject[
'amount']) || !is_numeric($subject[
'amount'])) {
46 throw new \InvalidArgumentException(
'Amount should be provided');
49 return $subject[
'amount'];
60 if (!isset($subject[
'field']) || !is_string($subject[
'field'])) {
61 throw new \InvalidArgumentException(
'Field does not exist');
64 return $subject[
'field'];
75 if (!isset($subject[
'response']) || !is_array($subject[
'response'])) {
76 throw new \InvalidArgumentException(
'Response does not exist');
79 return $subject[
'response'];
90 if (!isset($subject[
'stateObject']) || !$subject[
'stateObject'] instanceof
DataObject) {
91 throw new \InvalidArgumentException(
'State object does not exist');
94 return $subject[
'stateObject'];
static readField(array $subject)
static readResponse(array $subject)
static readPayment(array $subject)
static readAmount(array $subject)
static readStateObject(array $subject)