Skip to content

Commit

Permalink
Merge pull request #122 from pooliestudios/bugfixes
Browse files Browse the repository at this point in the history
bugfixes
  • Loading branch information
janteuber authored Feb 27, 2023
2 parents de81160 + 66006e6 commit 89f0d0c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Payone/Gateway/SecuredInstallment.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public function init_form_fields() {

public function payment_fields() {
$environment = $this->get_mode() === 'live' ? 'p' : 't';
$snippet_token = self::PAYLA_PARTNER_ID . $this->get_merchant_id() . md5(uniqid('payone_secured_installment', true));
$snippet_token = self::PAYLA_PARTNER_ID . '_' . $this->get_merchant_id() . '_' . md5(uniqid('payone_secured_installment', true));

include PAYONE_VIEW_PATH . '/gateway/common/checkout-form-fields.php';
include PAYONE_VIEW_PATH . '/gateway/payla/secured-installment-payment-form.php';
Expand Down
2 changes: 1 addition & 1 deletion src/Payone/Gateway/SecuredInvoice.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public function init_form_fields() {

public function payment_fields() {
$environment = $this->get_mode() === 'live' ? 'p' : 't';
$snippet_token = self::PAYLA_PARTNER_ID . $this->get_merchant_id() . md5(uniqid('payone_secured_invioce', true));
$snippet_token = self::PAYLA_PARTNER_ID . '_' . $this->get_merchant_id() . '_' . md5(uniqid('payone_secured_invoice', true));

include PAYONE_VIEW_PATH . '/gateway/common/checkout-form-fields.php';
include PAYONE_VIEW_PATH . '/gateway/payla/secured-invoice-payment-form.php';
Expand Down
5 changes: 5 additions & 0 deletions src/Payone/Payone/Api/DataTransfer.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,11 @@ public function clear() {
*
*/
public function set( $key, $value ) {
if ( $key === 'amount' ) {
// make sure that $value is always an integer
$value = (int) round( $value, 0 );
}

$this->parameter_bag[ $key ] = $value;

return $this;
Expand Down

0 comments on commit 89f0d0c

Please sign in to comment.