Skip to content

Commit

Permalink
Moved to public some data functions
Browse files Browse the repository at this point in the history
  • Loading branch information
eusonlito committed Apr 18, 2017
1 parent af9e434 commit 822bedc
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions src/Redsys/Tpv/Tpv.php
Original file line number Diff line number Diff line change
Expand Up @@ -133,18 +133,23 @@ public function getFormHiddens()
}

return $this->getInputHidden('SignatureVersion', $this->options['SignatureVersion'])
.$this->getInputHidden('MerchantParameters', $this->getMerchantParameters())
.$this->getInputHidden('MerchantParameters', $this->getMerchantParametersEncoded())
.$this->getInputHidden('Signature', $this->getValuesSignature());
}

private function getInputHidden($name, $value)
public function getInputHidden($name, $value)
{
return "\n".'<input type="hidden" name="Ds_'.$name.'" value="'.$value.'" />';
}

private function getMerchantParameters()
public function getMerchantParameters()
{
return base64_encode(json_encode($this->values));
return $this->values;
}

public function getMerchantParametersEncoded()
{
return base64_encode(json_encode($this->getMerchantParameters()));
}

public function sendXml(array $options)
Expand Down

0 comments on commit 822bedc

Please sign in to comment.