Add sandbox parameter to fraudnet json config

This commit is contained in:
dinamiko 2022-04-25 15:58:30 +02:00
parent 6ad27c82b7
commit acf7fa6d00
2 changed files with 6 additions and 2 deletions

View file

@ -23,6 +23,9 @@ window.addEventListener('load', function() {
'f': FraudNetConfig.f,
's': FraudNetConfig.s
};
if(FraudNetConfig.sandbox === '1') {
configuration.sandbox = true;
}
script.text = JSON.stringify(configuration);
document.body.appendChild(script);

View file

@ -283,8 +283,9 @@ class PayUponInvoice {
'ppcp-pay-upon-invoice',
'FraudNetConfig',
array(
'f' => $this->fraud_net->session_id(),
's' => $this->fraud_net->source_website_id(),
'f' => $this->fraud_net->session_id(),
's' => $this->fraud_net->source_website_id(),
'sandbox' => $this->environment->current_environment_is( Environment::SANDBOX ),
)
);
}