public function processRequest(PurchaseRequest $request) { if ($request->getAmount() < self::$ALLOWABLE) { echo "President will approve \$" . $request->getAmount(); } else { echo "Your request for \$" . $request->getAmount() . " needs a board meeting!"; } }
public function processRequest(PurchaseRequest $request) { if ($request->getAmount() < self::$ALLOWABLE) { echo "Vice President will approve \$" . $request->getAmount(); } else { if ($this->successor != null) { $this->successor->processRequest($request); } } }
public function getData() { $data = parent::getData(); // perform an authorize operation $data['OPERATION'] = Helper::POSTFINANCE_OPERATION_AUTHORIZE; return $data; }
public function getData() { $data = parent::getData(); $data['paymentOptionId'] = '10'; $data['amount'] = intval($this->getAmount() * 100); $data['finishUrl'] = $this->getReturnUrl(); $data['ipaddress'] = $this->getClientIP(); $data['paymentOptionSubId'] = $this->issuer; $data['statsData']['extra1'] = $this->getTransactionReference(); $data['transaction']['description'] = $this->getDescription(); return $data; }
public function testSetSessionId() { $this->request->setSessionId('twelvechars1'); $this->assertSame('twelvechars1', $this->request->getSessionId()); $this->assertSame('twelvechars1', $this->request->getTransactionId()); $this->request->setSessionId('morethantwentycharacters'); // truncates $this->assertSame('morethantwentycharac', $this->request->getSessionId()); $this->assertSame('morethantwentycharac', $this->request->getTransactionId()); }
public function sendData($data, $root = 'delete-billing') { return parent::sendData($data, $root); }
public function sendData($data, $root = 'add-plan') { return parent::sendData($data, $root); }
public function getEndpoint() { return parent::getEndpoint() . '/' . $this->getTransactionReference(); }
/** * getData * * @return array * @throws \Omnipay\Common\Exception\InvalidCreditCardException * @throws \Omnipay\Common\Exception\InvalidRequestException */ public function getData() { $data = parent::getData(); $data['auth_only'] = 1; return $data; }
public function sendData($data, $root = 'add-customer') { return parent::sendData($data, $root); }
public function sendData($data, $root = 'auth') { return parent::sendData($data, $root); }
/** @test */ public function it_returns_the_expected_response_type() { $this->setMockHttpResponse('PurchaseSuccess.txt'); $response = $this->request->send(); $this->assertInstanceOf('Omnipay\\Secupay\\Message\\Response', $response); }
public function sendData($data, $root = 'add-subscription') { return parent::sendData($data, $root); }