関数
Capture::populate()
Populates error store
説明 説明
ファイル: src/API/Charge/Capture.php
public function populate() { $this->addError(new GenericError( self::TRANSACTION_AMOUNT_EXCEEDED, $this->getConstantNameByValue(self::TRANSACTION_AMOUNT_EXCEEDED), 400, function ($message) { return $message; }, __('Transaction amount exceeded.', '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 1 successfully captured Charge, per Charge Permission", 'wcexaap') )); $this->addError(new GenericError( self::INVALID_CHARGE_PERMISSION_STATUS, $this->getConstantNameByValue(self::INVALID_CHARGE_PERMISSION_STATUS), 422, function ($message) { return $message; }, __('You tried to call an operation on a Charge Permission that is in a state where that operation cannot be called', 'wcexaap') )); $this->addError(new GenericError( self::INVALID_CHARGE_STATUS, $this->getConstantNameByValue(self::INVALID_CHARGE_STATUS), 422, function ($message) { return $message; }, __('This order has already been processed', 'wcexaap') )); $this->addError(new GenericError( self::AMAZON_REJECTED, $this->getConstantNameByValue(self::AMAZON_REJECTED), 422, function ($message) { return $message; }, __('The request to capture payment was rejected by Amazon.', 'wcexaap') )); $this->addError(new GenericError( self::PROCESSING_FAILURE, $this->getConstantNameByValue(self::PROCESSING_FAILURE), 422, function ($message) { return $message; }, __('Amazon was unable to process the charge due to an internal error.', 'wcexaap') )); }