Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
litvinjuan committed Aug 10, 2019
1 parent 31c5809 commit fc7685c
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 4 deletions.
4 changes: 2 additions & 2 deletions database/migrations/create_payments_table.php.stub
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ class CreatePaymentsTable extends Migration
$table->string('description');

$table->string('state')->default(PaymentState::defaultValue());
$table->json('parameters');
$table->text('parameters');

$table->timestamp('completed_at');
$table->dateTime('completed_at')->nullable();
$table->timestamps();
$table->softDeletes();
});
Expand Down
4 changes: 3 additions & 1 deletion src/Payments/Payment.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,9 @@ public function setGateway(string $gateway)
*/
public function setParameter($key, $value)
{
$this->parameters[$key] = $value;
$params = $this->parameters;
$params[$key] = $value;
$this->parameters = $params;
$this->save();
}

Expand Down
2 changes: 1 addition & 1 deletion src/Requests/AbstractRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ private function validate()
* @param string[] $args
* @throws InvalidRequestException
*/
private function validateParameters(...$args)
private function validateParameters(array $args)
{
foreach ($args as $key) {
$value = $this->parameters[$key];
Expand Down
5 changes: 5 additions & 0 deletions src/Responses/AbstractValidatePaymentResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,9 @@ public abstract function getGatewayId();
*/
public abstract function validated();

/**
* @return string
*/
public abstract function getMessage();

}

0 comments on commit fc7685c

Please sign in to comment.