/home/techb158/immovalet.com/vendor/mollie/mollie-api-php/src/Resources
NameSizeModeActions
BaseCollection.php5860644editdlrm
BaseResource.php3130644editdlrm
Capture.php11760644editdlrm
CaptureCollection.php3640644editdlrm
Chargeback.php9780644editdlrm
ChargebackCollection.php3730644editdlrm
CurrentProfile.php8090644editdlrm
CursorCollection.php24680644editdlrm
Customer.php53900644editdlrm
CustomerCollection.php3670644editdlrm
Invoice.php19190644editdlrm
InvoiceCollection.php3640644editdlrm
Issuer.php5140644editdlrm
IssuerCollection.php2140644editdlrm
Mandate.php18690644editdlrm
MandateCollection.php7730644editdlrm
Method.php21030644editdlrm
MethodCollection.php2140644editdlrm
MethodPrice.php7340644editdlrm
MethodPriceCollection.php2190644editdlrm
Onboarding.php11200644editdlrm
Order.php125380644editdlrm
OrderCollection.php3580644editdlrm
OrderLine.php85080644editdlrm
OrderLineCollection.php5870644editdlrm
Organization.php12870644editdlrm
OrganizationCollection.php3790644editdlrm
Payment.php170700644editdlrm
PaymentCollection.php3640644editdlrm
PaymentLink.php23850644editdlrm
PaymentLinkCollection.php3770644editdlrm
Permission.php3960644editdlrm
PermissionCollection.php2220644editdlrm
Profile.php53290644editdlrm
ProfileCollection.php3640644editdlrm
Refund.php26990644editdlrm
RefundCollection.php3610644editdlrm
ResourceFactory.php20460644editdlrm
Settlement.php46020644editdlrm
SettlementCollection.php3730644editdlrm
Shipment.php27080644editdlrm
ShipmentCollection.php2180644editdlrm
Subscription.php46850644editdlrm
SubscriptionCollection.php3790644editdlrm
Edit: /home/techb158/immovalet.com/vendor/mollie/mollie-api-php/src/Resources/Payment.php (17070B)
consumerName and $details->consumerAccount. * * @var \stdClass|null */ public $details; /** * Used to restrict the payment methods available to your customer to those from a single country. * * @var string|null; */ public $restrictPaymentMethodsToCountry; /** * @var \stdClass */ public $_links; /** * @var \stdClass[] */ public $_embedded; /** * Whether or not this payment can be canceled. * * @var bool|null */ public $isCancelable; /** * The total amount that is already captured for this payment. Only available * when this payment supports captures. * * @var \stdClass|null */ public $amountCaptured; /** * The application fee, if the payment was created with one. Contains amount * (the value and currency) and description. * * @var \stdClass|null */ public $applicationFee; /** * The date and time the payment became authorized, in ISO 8601 format. This * parameter is omitted if the payment is not authorized (yet). * * @example "2013-12-25T10:30:54+00:00" * @var string|null */ public $authorizedAt; /** * The date and time the payment was expired, in ISO 8601 format. This * parameter is omitted if the payment did not expire (yet). * * @example "2013-12-25T10:30:54+00:00" * @var string|null */ public $expiredAt; /** * If a customer was specified upon payment creation, the customer’s token will * be available here as well. * * @example cst_XPn78q9CfT * @var string|null */ public $customerId; /** * This optional field contains your customer’s ISO 3166-1 alpha-2 country code, * detected by us during checkout. For example: BE. This field is omitted if the * country code was not detected. * * @var string|null */ public $countryCode; /** * Is this payment canceled? * * @return bool */ public function isCanceled() { return $this->status === PaymentStatus::STATUS_CANCELED; } /** * Is this payment expired? * * @return bool */ public function isExpired() { return $this->status === PaymentStatus::STATUS_EXPIRED; } /** * Is this payment still open / ongoing? * * @return bool */ public function isOpen() { return $this->status === PaymentStatus::STATUS_OPEN; } /** * Is this payment pending? * * @return bool */ public function isPending() { return $this->status === PaymentStatus::STATUS_PENDING; } /** * Is this payment authorized? * * @return bool */ public function isAuthorized() { return $this->status === PaymentStatus::STATUS_AUTHORIZED; } /** * Is this payment paid for? * * @return bool */ public function isPaid() { return ! empty($this->paidAt); } /** * Does the payment have refunds * * @return bool */ public function hasRefunds() { return ! empty($this->_links->refunds); } /** * Does this payment has chargebacks * * @return bool */ public function hasChargebacks() { return ! empty($this->_links->chargebacks); } /** * Is this payment failing? * * @return bool */ public function isFailed() { return $this->status === PaymentStatus::STATUS_FAILED; } /** * Check whether 'sequenceType' is set to 'first'. If a 'first' payment has been * completed successfully, the consumer's account may be charged automatically * using recurring payments. * * @return bool */ public function hasSequenceTypeFirst() { return $this->sequenceType === SequenceType::SEQUENCETYPE_FIRST; } /** * Check whether 'sequenceType' is set to 'recurring'. This type of payment is * processed without involving * the consumer. * * @return bool */ public function hasSequenceTypeRecurring() { return $this->sequenceType === SequenceType::SEQUENCETYPE_RECURRING; } /** * Get the checkout URL where the customer can complete the payment. * * @return string|null */ public function getCheckoutUrl() { if (empty($this->_links->checkout)) { return null; } return $this->_links->checkout->href; } /** * @return bool */ public function canBeRefunded() { return $this->amountRemaining !== null; } /** * @return bool */ public function canBePartiallyRefunded() { return $this->canBeRefunded(); } /** * Get the amount that is already refunded * * @return float */ public function getAmountRefunded() { if ($this->amountRefunded) { return (float)$this->amountRefunded->value; } return 0.0; } /** * Get the remaining amount that can be refunded. For some payment methods this * amount can be higher than the payment amount. This is possible to reimburse * the costs for a return shipment to your customer for example. * * @return float */ public function getAmountRemaining() { if ($this->amountRemaining) { return (float)$this->amountRemaining->value; } return 0.0; } /** * Retrieves all refunds associated with this payment * * @return RefundCollection * @throws ApiException */ public function refunds() { if (! isset($this->_links->refunds->href)) { return new RefundCollection($this->client, 0, null); } $result = $this->client->performHttpCallToFullUrl( MollieApiClient::HTTP_GET, $this->_links->refunds->href ); return ResourceFactory::createCursorResourceCollection( $this->client, $result->_embedded->refunds, Refund::class, $result->_links ); } /** * @param string $refundId * @param array $parameters * * @return Refund */ public function getRefund($refundId, array $parameters = []) { return $this->client->paymentRefunds->getFor($this, $refundId, $this->withPresetOptions($parameters)); } /** * @param array $parameters * * @return Refund */ public function listRefunds(array $parameters = []) { return $this->client->paymentRefunds->listFor($this, $this->withPresetOptions($parameters)); } /** * Retrieves all captures associated with this payment * * @return CaptureCollection * @throws ApiException */ public function captures() { if (! isset($this->_links->captures->href)) { return new CaptureCollection($this->client, 0, null); } $result = $this->client->performHttpCallToFullUrl( MollieApiClient::HTTP_GET, $this->_links->captures->href ); return ResourceFactory::createCursorResourceCollection( $this->client, $result->_embedded->captures, Capture::class, $result->_links ); } /** * @param string $captureId * @param array $parameters * * @return Capture */ public function getCapture($captureId, array $parameters = []) { return $this->client->paymentCaptures->getFor( $this, $captureId, $this->withPresetOptions($parameters) ); } /** * Retrieves all chargebacks associated with this payment * * @return ChargebackCollection * @throws ApiException */ public function chargebacks() { if (! isset($this->_links->chargebacks->href)) { return new ChargebackCollection($this->client, 0, null); } $result = $this->client->performHttpCallToFullUrl( MollieApiClient::HTTP_GET, $this->_links->chargebacks->href ); return ResourceFactory::createCursorResourceCollection( $this->client, $result->_embedded->chargebacks, Chargeback::class, $result->_links ); } /** * Retrieves a specific chargeback for this payment. * * @param string $chargebackId * @param array $parameters * * @return Chargeback */ public function getChargeback($chargebackId, array $parameters = []) { return $this->client->paymentChargebacks->getFor( $this, $chargebackId, $this->withPresetOptions($parameters) ); } /** * Issue a refund for this payment. * * @param array $data * * @return BaseResource * @throws ApiException */ public function refund($data) { $resource = "payments/" . urlencode($this->id) . "/refunds"; $data = $this->withPresetOptions($data); $body = null; if (count($data) > 0) { $body = json_encode($data); } $result = $this->client->performHttpCall( MollieApiClient::HTTP_POST, $resource, $body ); return ResourceFactory::createFromApiResult( $result, new Refund($this->client) ); } public function update() { $body = [ "description" => $this->description, "redirectUrl" => $this->redirectUrl, "webhookUrl" => $this->webhookUrl, "metadata" => $this->metadata, "restrictPaymentMethodsToCountry" => $this->restrictPaymentMethodsToCountry, "locale" => $this->locale, "dueDate" => $this->dueDate, ]; $result = $this->client->payments->update($this->id, $body); return ResourceFactory::createFromApiResult($result, new Payment($this->client)); } /** * When accessed by oAuth we want to pass the testmode by default * * @return array */ private function getPresetOptions() { $options = []; if ($this->client->usesOAuth()) { $options["testmode"] = $this->mode === "test" ? true : false; } return $options; } /** * Apply the preset options. * * @param array $options * @return array */ private function withPresetOptions(array $options) { return array_merge($this->getPresetOptions(), $options); } /** * The total amount that is already captured for this payment. Only available * when this payment supports captures. * * @return float */ public function getAmountCaptured() { if ($this->amountCaptured) { return (float)$this->amountCaptured->value; } return 0.0; } /** * The amount that has been settled. * * @return float */ public function getSettlementAmount() { if ($this->settlementAmount) { return (float)$this->settlementAmount->value; } return 0.0; } /** * The total amount that is already captured for this payment. Only available * when this payment supports captures. * * @return float */ public function getApplicationFeeAmount() { if ($this->applicationFee) { return (float)$this->applicationFee->amount->value; } return 0.0; } }