CodeExplorer getRequestData example
$returnUrl = 'https://foo.bar';
$requestData =
['foo' => 'bar'
];
$recurring =
new RecurringDataStruct('foo',
new \
DateTime());
$source =
new Source('foo', 'bar', '1.0.0'
);
$payload =
new AsyncPayPayload($transaction,
$order,
$returnUrl,
$requestData,
$recurring);
$payload->
setSource($source);
static::
assertEquals($transaction,
$payload->
getOrderTransaction());
static::
assertSame($order,
$payload->
getOrder());
static::
assertSame($returnUrl,
$payload->
getReturnUrl());
static::
assertSame($requestData,
$payload->
getRequestData());
static::
assertSame($recurring,
$payload->
getRecurring());
static::
assertSame($source,
$payload->
getSource());
}} $transaction =
new OrderTransactionEntity();
$order =
new OrderEntity();
$requestData =
['foo' => 'bar'
];
$recurring =
new RecurringDataStruct('foo',
new \
DateTime());
$source =
new Source('foo', 'bar', '1.0.0'
);
$payload =
new RecurringPayPayload($transaction,
$order,
$requestData,
$recurring);
$payload->
setSource($source);
static::
assertEquals($transaction,
$payload->
getOrderTransaction());
static::
assertSame($order,
$payload->
getOrder());
static::
assertSame($requestData,
$payload->
getRequestData());
static::
assertSame($recurring,
$payload->
getRecurring());
static::
assertSame($source,
$payload->
getSource());
}} $transaction =
new OrderTransactionEntity();
$order =
new OrderEntity();
$requestData =
['foo' => 'bar'
];
$recurring =
new RecurringDataStruct('foo',
new \
DateTime());
$source =
new Source('foo', 'bar', '1.0.0'
);
$payload =
new SyncPayPayload($transaction,
$order,
$requestData,
$recurring);
$payload->
setSource($source);
static::
assertEquals($transaction,
$payload->
getOrderTransaction());
static::
assertSame($order,
$payload->
getOrder());
static::
assertSame($requestData,
$payload->
getRequestData());
static::
assertSame($recurring,
$payload->
getRecurring());
static::
assertSame($source,
$payload->
getSource());
}}