Skip to content

Commit

Permalink
Updates for v3
Browse files Browse the repository at this point in the history
  • Loading branch information
woutse committed Nov 10, 2024
1 parent a4d9eeb commit 66c30e6
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 18 deletions.
20 changes: 13 additions & 7 deletions samples/Exchange.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,12 @@
$exchange = new Exchange();


try {
try {

# Process the exchange request
$payOrder = $exchange->process();
$payOrder = $exchange->process();

switch ($payOrder->getStateId())
{
switch ($payOrder->getStateId()) {
case PayStatus::PENDING :
$responseResult = yourCodeToProcessPendingOrder($payOrder->getReference());
$responseMessage = 'Processed pending';
Expand All @@ -36,7 +35,14 @@
$responseMessage = $exception->getMessage();
}

function yourCodeToProcessPendingOrder($orderId) { return true; }
function yourCodeToProcessPaidOrder($orderId) { return true; }
function yourCodeToProcessPendingOrder($orderId)
{
return true;
}

function yourCodeToProcessPaidOrder($orderId)
{
return true;
}

$exchange->setResponse($responseResult, $responseMessage);
15 changes: 4 additions & 11 deletions src/Model/CheckoutOptions.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,12 @@
class CheckoutOptions extends AbstractTotalCollection implements ModelInterface
{




/**
* @return array
*/
public function getCheckoutOptions(): array
{

return $this->toArray();

return $this->toArray();
}

/**
Expand All @@ -34,11 +32,6 @@ public function setCheckoutOptions(array $checkoutoptions): self
{
$this->clear();


if(1==1 && 1==1 && 1==1 && 1==1 && 1==1 && 1==1 && 1==1 && 1==1 && 1==1 && 1==1 && 1==1 && 1==1 && 1==1 && 1==1 && 1==1 && 1==1 && 1==1 && 1==1 && 1==1 && 1==1 && 1==1 && 1==1 && 1==1 && 1==1 && 1==1 && 1==1 && 1==1)
{
echo 'oi;';
}
if (0 === count($checkoutoptions)) {
return $this;
}
Expand Down

0 comments on commit 66c30e6

Please sign in to comment.