Get the receipt data of an instore payment
ONLY AVAILABLE FOR 30 MINUTES AFTER COMPLETING THE TRANSACTION!

Options:
['hash'] The hash of the instore payment transaction

@param array $options (see above)
@return Result\Receipt
180643
public static function getReceipt($options)
    {
        $api = new Api\GetTransactionTicket();
        if (isset($options['hash'])) {
            $api->setHash($options['hash']);
        }

        $result = $api->doRequest();
        return new Result\Receipt($result);
    }
36224
public static function parse($options)
    {
        if ($options instanceof self) {
            return $options;
        }

        if (is_null($options)) {
            return new RequestOptions(null, [], null);
        }

        if (is_string($options)) {
            return new RequestOptions($options, [], null);
        }

        if (is_array($options)) {
            $headers = [];
            $key = null;
            $base = null;
            if (array_key_exists('api_key', $options)) {
                $key = $options['api_key'];
            }
            if (array_key_exists('idempotency_key', $options)) {
                $headers['Idempotency-Key'] = $options['idempotency_key'];
            }
            if (array_key_exists('stripe_account', $options)) {
                $headers['Stripe-Account'] = $options['stripe_account'];
            }
            if (array_key_exists('stripe_version', $options)) {
                $headers['Stripe-Version'] = $options['stripe_version'];
            }
            if (array_key_exists('api_base', $options)) {
                $base = $options['api_base'];
            }
            return new RequestOptions($key, $headers, $base);
        }

        $message = 'The second argument to Stripe API method calls is an '
           . 'optional per-request apiKey, which must be a string, or '
           . 'per-request options, which must be an array. (HINT: you can set '
           . 'a global apiKey by "Stripe::setApiKey(<apiKey>)")';
        throw new Error\Api($message);
    }
801064
public function queryRefund(array $options)
    {
        $pay = new Refund($this->config->get());
        return $pay->query($options);
    }
531445
public function complete($options = [])
    {
        return $this->gateway->commit(
            'post',
            $this->gateway->buildUrlFromString(sprintf('payments/payment/%s/execute', $options['payment'])),
            ['payer_id' => Arr::get($options, 'payer_id')],
            ['token'    => Arr::get($options, 'token')]
        );
    }
29384
protected function getResourcePayload(array $options = []) : ?array
    {
        $local  = $this->parseLocalResources($this->resources->get('compiled'));
        $remote = $this->resources->get('styles.remote');

        $sheets = $this->mergeResourceArrays($local, $remote);

        if ($sheets === null) {
            return null;
        }

        ksort($sheets);

        return $sheets;
    }
475066
public function payment($parameters)
    {
        $array = $this->getParameters($parameters);
        $array['Shop_IDP'] = $this->getShopId();
        $array['Signature'] = $this->signaturePayment
            ->setShopIdp(array_get($array, 'Shop_IDP'))
            ->setOrderIdp(array_get($array, 'Order_IDP'))
            ->setSubtotalP(array_get($array, 'Subtotal_P'))
            ->setMeanType(array_get($array, 'MeanType'))
            ->setEMoneyType(array_get($array, 'EMoneyType'))
            ->setLifeTime(array_get($array, 'Lifetime'))
            ->setCustomerIdp(array_get($array, 'Customer_IDP'))
            ->setCardIdp(array_get($array, 'Card_IDP'))
            ->setIData(array_get($array, 'IData'))
            ->setPtCode(array_get($array, 'PT_Code'))
            ->setPassword($this->getPassword())
            ->create();

        return $this->getPayment()->execute($array, $this->getOptions());
    }
612112
private function getOption($option, array $options)
    {
        return isset($options[$option]) ? $options[$option] : $this->$option;
    }
471308
public function getPhotos(array $options = array())
    {

        $uri = $this->buildUserResourceUri('photos');
        $response = $this->makeAuthenticatedApiRequest($uri);

        return $response->photos->items;

    }
1041264
public function getPk($options = '')
    {
        if (!empty($this->pk)) {
            $pk = $this->pk;
        } else {
            $pk = $this->connection->getPk(is_array($options) && isset($options['table']) ? $options['table'] : $this->getTable());
        }

        return $pk;
    }
533521
public function save(array $options = array())
    {
        $result = false;
        
        if ($this->pricelistId) {
            $result = parent::save($options);
            $order = Order::find($this->id);
            $order->pricelists()->attach($this->pricelistId);
        } else {
            throw new Exception('pricelist_id not set.');
        }
        
        return $result;
    }
733382
protected function process(array $options)
    {
        $event = $this->startProfiling($this->getName(), 'get');

        $response = $this->getClient()->get($this->url, ['query' => $options]);
        $json = json_decode($response->getBody()->getContents(), true);

        $result = isset($json['data']['languages']) ? $json['data']['languages'] : [];

        $this->stopProfiling($event, $this->getName(), $result);

        return $result;
    }
2524
public function retrieve($options = array(), $isArray = false)
    {
        $params = array(
            'consumer_key'  => $this->consumer_key,
            'access_token'  => $this->access_token
        );

        // combine the creds with any options sent
        $params = array_merge($params, $options);

        $request = $this->getClient()->post('/v3/get');
        $request->getParams()->set('redirect.strict', true);
        $request->setHeader('Content-Type', 'application/json; charset=UTF8');
        $request->setHeader('X-Accept', 'application/json');
        $request->setBody(json_encode($params));
        $response = $request->send();

        return json_decode($response->getBody(), $isArray);
    }
1225419
public function getRecent(array $options = [])
    {
        $query = $this->createBaseBuilder($options);

        $query->orderBy($this->getCreatedAtColumn(), 'DESC');

        return $query->get();
    }
50642
public function complete($options = [])
    {
        $params = [
            'type'   => 'charge',
            'status' => new Status('paid'),
        ];

        return $this->gateway->commit(null, null, $params);
    }
192244
protected function getOrderData($options)
    {
        parent::addEntry(
            $options['orderId'],
            $options['orderNumber'],
            'order',
            new DateTime($options['orderDate']),
            parent::getRoute($options['orderId'], 'order', 'details'),
            parent::getRoute($options['orderId'], 'order', 'pdf')
        );
    }
1057675
public function get(array $options = [])
    {
        $pagination = '';

        if (isset($options['page']) && is_int($options['page'])) {
            $pagination = '?page='.$options['page'];
        }

        if (isset($options['key'])) {
            return $this->client->get('plugin-licenses/'.$options['key'].$pagination);
        }

        return $this->client->get('plugin-licenses'.$pagination);
    }
322005
public function last(array $options = []) {
        if ($order = $this->getOrderBy()) {
            $this->_orderBy = [];

            foreach ($order as $field => $dir) {
                if ($dir === 'asc') {
                    $dir = 'desc';
                } else if ($dir === 'desc') {
                    $dir = 'asc';
                }

                if (is_numeric($field)) {
                    $this->orderBy($dir);
                } else {
                    $this->orderBy($field, $dir);
                }
            }
        } else {
            $this->orderBy($this->getRepository()->getPrimaryKey(), 'desc');
        }

        return $this->limit(1)->find('first', $options);
    }