関数
Create::populate()
Populates error store
説明 説明
ファイル: src/API/Refund/Create.php
public function populate() { $this->addError(new GenericError( self::TRANSACTION_AMOUNT_EXCEEDED, $this->getConstantNameByValue(self::TRANSACTION_AMOUNT_EXCEEDED), 400, function ($message) { return $message; }, __('You\'ve exceeded the maximum refund amount allowed for this Refund', 'wcexaap') )); $this->addError(new GenericError( self::INVALID_CHARGE_STATUS, $this->getConstantNameByValue(self::INVALID_CHARGE_STATUS), 422, function ($message) { return $message; }, __('You tried to call a Refund operation on a Charge that is not in a Completed state. Check the Charge status for more information', 'wcexaap') )); $this->addError(new GenericError( self::TRANSACTION_COUNT_EXCEEDED, $this->getConstantNameByValue(self::TRANSACTION_COUNT_EXCEEDED), 422, function ($message) { return $message; }, __('You\'ve exceeded the maximum limit of 10 Refunds per Charge', 'wcexaap') )); $this->addError(new GenericError( self::AMAZON_REJECTED, $this->getConstantNameByValue(self::AMAZON_REJECTED), 422, function ($message) { return $message; }, __('Amazon has rejected the refund. You should issue a refund to the buyer in an alternate manner (for example, a gift card or store credit)', 'wcexaap') )); $this->addError(new GenericError( self::PROCESSING_FAILURE, $this->getConstantNameByValue(self::PROCESSING_FAILURE), 500, function ($message) { return $message; }, __('Amazon could not process the transaction because of an internal processing error or because the buyer has already received a refund from an A-to-z claim or a chargeback. You should only retry the Refund if the Charge object is in the Captured state. Otherwise, you should refund the buyer in an alternative way (for example, a store credit or a check)', 'wcexaap') )); }