Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

<?php final class PhortuneCartVoidController extends PhortuneCartController { protec..

Decoded Output download

<?php

final class PhortuneCartVoidController
  extends PhortuneCartController {

  protected function shouldRequireAccountAuthority() {
    return false;
  }

  protected function shouldRequireMerchantAuthority() {
    return true;
  }

  protected function handleCartRequest(AphrontRequest $request) {
    $viewer = $request->getViewer();
    $cart = $this->getCart();

    $cancel_uri = $cart->getDetailURI();

    try {
      $title = pht('Unable to Void Invoice');
      $cart->assertCanVoidOrder();
    } catch (Exception $ex) {
      return $this->newDialog()
        ->setTitle($title)
        ->appendChild($ex->getMessage())
        ->addCancelButton($cancel_uri);
    }

    if ($request->isFormPost()) {
      return id(new AphrontRedirectResponse())->setURI($cancel_uri);
    }

    return $this->newDialog()
      ->setTitle(pht('Void Invoice?'))
      ->appendParagraph(
        pht(
          'Really void this invoice? The customer will no longer be asked '.
          'to submit payment for it.'))
      ->addCancelButton($cancel_uri)
      ->addSubmitButton(pht('Void Invoice'));
  }
}
 ?>

Did this file decode correctly?

Original Code

<?php

final class PhortuneCartVoidController
  extends PhortuneCartController {

  protected function shouldRequireAccountAuthority() {
    return false;
  }

  protected function shouldRequireMerchantAuthority() {
    return true;
  }

  protected function handleCartRequest(AphrontRequest $request) {
    $viewer = $request->getViewer();
    $cart = $this->getCart();

    $cancel_uri = $cart->getDetailURI();

    try {
      $title = pht('Unable to Void Invoice');
      $cart->assertCanVoidOrder();
    } catch (Exception $ex) {
      return $this->newDialog()
        ->setTitle($title)
        ->appendChild($ex->getMessage())
        ->addCancelButton($cancel_uri);
    }

    if ($request->isFormPost()) {
      return id(new AphrontRedirectResponse())->setURI($cancel_uri);
    }

    return $this->newDialog()
      ->setTitle(pht('Void Invoice?'))
      ->appendParagraph(
        pht(
          'Really void this invoice? The customer will no longer be asked '.
          'to submit payment for it.'))
      ->addCancelButton($cancel_uri)
      ->addSubmitButton(pht('Void Invoice'));
  }
}

Function Calls

None

Variables

None

Stats

MD5 8e299631d8d3bb6b27c32bc7cb414cad
Eval Count 0
Decode Time 102 ms