# \[#1230\] Signature is not set error

**URL:** https://tech-support.simplybook.me/t/1230-signature-is-not-set-error/1230
**Category:** Bug Reports
**Tags:** migrated, redmine-1230
**Created:** [May 7, 2024, 7:36am UTC](https://tech-support.simplybook.me/t/1230-signature-is-not-set-error/1230 "2024-05-07T07:36:00Z")
**Posts on this page:** 13
**Page:** 1

<div class="post-metadata">

### Author: ![system](https://tech-support.simplybook.me/uploads/default/original/1X/faedac32116409149d0a20d900b3047df01a4ad0.png) [@system](https://tech-support.simplybook.me/u/system)
#### Post date: [May 7, 2024, 7:36am UTC](https://tech-support.simplybook.me/t/1230-signature-is-not-set-error/1230/1 "2024-05-07T07:36:00Z")

</div>

**Migrated from Redmine #1230** | _Author: Tudor Cotop_  
_Status: Feedback | Priority: High, I’m very impatient | Created: 2024-05-07_

* * *

I have been trying to build a custom payment processor, following the steps described here: [sbpay-sdk/example/custom\_payment\_processor/config.php at main · dimkasb/sbpay-sdk · GitHub](https://github.com/dimkasb/sbpay-sdk/blob/main/example/custom_payment_processor/config.php). I’ve done what I think should be done, but when calling this line here: $client-\>payments()-\>validateCustomPaymentProcessorRequest($\_POST);, I get the error “Signaturs is not set”.

That makes me believe that maybe the way I’ve configured the client is not correct. According to the documentation, I need these four values:

const SBPAY\_TOKEN = ‘xxxxx’;  
// Your SBPay secret  
const SBPAY\_SECRET = ‘xxxxx’;  
// Your SBPay merchant  
const SBPAY\_MERCHANT = ‘xxxxx’;  
// SBPay host  
const SBPAY\_HOST = ‘[https://app.sbpay.me/](https://app.sbpay.me/)’;

For the TOKEN, I’ve used the API key, and for the secret I’ve used the API secret. I’ve left the HOST the same as in the demo, and for merchant, I’ve used londontest (my URL is: [https://londontest.simplybook.it/](https://londontest.simplybook.it/)).

Can you check that I’m using the correct values?

---

<div class="post-metadata">

### Author: ![system](https://tech-support.simplybook.me/uploads/default/original/1X/faedac32116409149d0a20d900b3047df01a4ad0.png) [@system](https://tech-support.simplybook.me/u/system)
#### Post date: [May 7, 2024, 7:39am UTC](https://tech-support.simplybook.me/t/1230-signature-is-not-set-error/1230/2 "2024-05-07T07:39:10Z")

</div>

**Dmytro Bondarev** wrote:

Hi, could you please clarify if you use simplybook keys or sbpay?  
You should get it from sbpay, please make admin user in sbpay and you will be able to obtain a pay keys.

---

<div class="post-metadata">

### Author: ![system](https://tech-support.simplybook.me/uploads/default/original/1X/faedac32116409149d0a20d900b3047df01a4ad0.png) [@system](https://tech-support.simplybook.me/u/system)
#### Post date: [May 7, 2024, 7:53am UTC](https://tech-support.simplybook.me/t/1230-signature-is-not-set-error/1230/3 "2024-05-07T07:53:51Z")

</div>

**Tudor Cotop** wrote:

Dmytro Bondarev wrote:

> Hi, could you please clarify if you use simplybook keys or sbpay?  
> You should get it from sbpay, please make admin user in sbpay and you will be able to obtain a pay keys.

Hi Dmytro,

Thanks for getting back to me on this one. Could you help me figure out how I can create an admin user in sbpay?

Thanks,  
Tudor

---

<div class="post-metadata">

### Author: ![system](https://tech-support.simplybook.me/uploads/default/original/1X/faedac32116409149d0a20d900b3047df01a4ad0.png) [@system](https://tech-support.simplybook.me/u/system)
#### Post date: [May 7, 2024, 7:55am UTC](https://tech-support.simplybook.me/t/1230-signature-is-not-set-error/1230/4 "2024-05-07T07:55:21Z")

</div>

**Dmytro Bondarev** wrote:

Hi, just login to sbpay from simplybook and then go to Users section in sbpay and create new user.

---

<div class="post-metadata">

### Author: ![system](https://tech-support.simplybook.me/uploads/default/original/1X/faedac32116409149d0a20d900b3047df01a4ad0.png) [@system](https://tech-support.simplybook.me/u/system)
#### Post date: [May 9, 2024, 10:49am UTC](https://tech-support.simplybook.me/t/1230-signature-is-not-set-error/1230/5 "2024-05-09T10:49:26Z")

</div>

**Tudor Cotop** wrote:

Hey Dmytro,

I’ve created an SBPay account, and I’ve changed the values for SBPAY\_TOKEN and SBPAY\_SECRET to match the ones I have in SBPay (authentication token and secret key). I’ve used “londontest” as the merchant id, and ‘[https://londontest.sbpay.me/](https://londontest.sbpay.me/)’ as the SBAY\_HOST, and I still get a signature error

---

<div class="post-metadata">

### Author: ![system](https://tech-support.simplybook.me/uploads/default/original/1X/faedac32116409149d0a20d900b3047df01a4ad0.png) [@system](https://tech-support.simplybook.me/u/system)
#### Post date: [May 9, 2024, 10:54am UTC](https://tech-support.simplybook.me/t/1230-signature-is-not-set-error/1230/6 "2024-05-09T10:54:44Z")

</div>

**Dmytro Bondarev** wrote:

Hi, the host must be [https://app.sbpay.me/](https://app.sbpay.me/)

---

<div class="post-metadata">

### Author: ![system](https://tech-support.simplybook.me/uploads/default/original/1X/faedac32116409149d0a20d900b3047df01a4ad0.png) [@system](https://tech-support.simplybook.me/u/system)
#### Post date: [May 9, 2024, 10:58am UTC](https://tech-support.simplybook.me/t/1230-signature-is-not-set-error/1230/7 "2024-05-09T10:58:36Z")

</div>

**Tudor Cotop** wrote:

Still the same error. Is the merchant id correct?

---

<div class="post-metadata">

### Author: ![system](https://tech-support.simplybook.me/uploads/default/original/1X/faedac32116409149d0a20d900b3047df01a4ad0.png) [@system](https://tech-support.simplybook.me/u/system)
#### Post date: [May 9, 2024, 11:00am UTC](https://tech-support.simplybook.me/t/1230-signature-is-not-set-error/1230/8 "2024-05-09T11:00:51Z")

</div>

**Dmytro Bondarev** wrote:

Yes, correct.  
Please provide code if you use SDK or HTTP requests if you use API.

---

<div class="post-metadata">

### Author: ![system](https://tech-support.simplybook.me/uploads/default/original/1X/faedac32116409149d0a20d900b3047df01a4ad0.png) [@system](https://tech-support.simplybook.me/u/system)
#### Post date: [May 9, 2024, 11:04am UTC](https://tech-support.simplybook.me/t/1230-signature-is-not-set-error/1230/9 "2024-05-09T11:04:33Z")

</div>

**Tudor Cotop** wrote:

This is the code I’m using:

$client = new \SBPay\SBPayClient(  
$data-\>sbpay\_token, $data-\>sbpay\_secret,  
$data-\>sbpay\_merchant, ‘[https://app.sbpay.me/](https://app.sbpay.me/)’  
);

try {  
// Validate request that comes from SBPay  
$client-\>payments()-\>validateCustomPaymentProcessorRequest($\_POST);  
} catch (\SBPay\Exceptions\Exception $e) {  
// handle exception. Just show error message for demo purposes  
die($e-\>getMessage());  
}

It should be the same as the example provided on GitHub. The $data is something I read from the DB, and it’s populated correctly.

---

<div class="post-metadata">

### Author: ![system](https://tech-support.simplybook.me/uploads/default/original/1X/faedac32116409149d0a20d900b3047df01a4ad0.png) [@system](https://tech-support.simplybook.me/u/system)
#### Post date: [May 9, 2024, 11:20am UTC](https://tech-support.simplybook.me/t/1230-signature-is-not-set-error/1230/10 "2024-05-09T11:20:32Z")

</div>

**Dmytro Bondarev** wrote:

Hi, please provide $\_POST data.

---

<div class="post-metadata">

### Author: ![system](https://tech-support.simplybook.me/uploads/default/original/1X/faedac32116409149d0a20d900b3047df01a4ad0.png) [@system](https://tech-support.simplybook.me/u/system)
#### Post date: [May 9, 2024, 11:36am UTC](https://tech-support.simplybook.me/t/1230-signature-is-not-set-error/1230/11 "2024-05-09T11:36:25Z")

</div>

**Tudor Cotop** wrote:

For whatever reason the POST that is being sent is redirected to a GET on my end. That’s definitely an issue so I’ll need to look into it.

But if I just run the example on your Github, it doesn’t work, because of this error. Is that the intended behaviour? To get the Signature not set error, when there’s no POST data?

---

<div class="post-metadata">

### Author: ![system](https://tech-support.simplybook.me/uploads/default/original/1X/faedac32116409149d0a20d900b3047df01a4ad0.png) [@system](https://tech-support.simplybook.me/u/system)
#### Post date: [May 9, 2024, 11:37am UTC](https://tech-support.simplybook.me/t/1230-signature-is-not-set-error/1230/12 "2024-05-09T11:37:32Z")

</div>

**Dmytro Bondarev** wrote:

Yes, if you don’t have data in POST (or request is not POST) then you will receive this error.

---

<div class="post-metadata">

### Author: ![system](https://tech-support.simplybook.me/uploads/default/original/1X/faedac32116409149d0a20d900b3047df01a4ad0.png) [@system](https://tech-support.simplybook.me/u/system)
#### Post date: [May 30, 2024, 7:48pm UTC](https://tech-support.simplybook.me/t/1230-signature-is-not-set-error/1230/13 "2024-05-30T19:48:03Z")

</div>

**Tudor Cotop** wrote:

All good now, and working as expected. Thanks for the help.
