> For the complete documentation index, see [llms.txt](https://payum.gitbook.io/payum/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://payum.gitbook.io/payum/working-with-sensitive-information.md).

# Working with sensitive information

### Supporting Payum

Payum is an MIT-licensed open source project with its ongoing development made possible entirely by the support of community and our customers. If you'd like to join them, please consider:

* [Become a sponsor](https://www.patreon.com/makasim)
* [Become our client](http://forma-pro.com/)

***

**Working with sensitive information**

All sensitive information (credit card number, cvv, card owner name etc) should be passed directly to a gateway. It is not allowed to store such information even temporally. If you want to store it you have to do it according to [PCI SSC Data Security Standards](https://www.pcisecuritystandards.org/security_standards/). It is very a challenging task and it is out of scope of this chapter. Here we describe some practices that helps you not to accidentally store sensitive info anywhere.

All info like credit cards have to be wrapped by `SensitiveValue` class.

```php
<?php

use Payum\Core\Security\SensitiveValue;

$cardNumber = new SensitiveValue('theCreditCardNumber');

serialize($cardNumber);
//null

clone $cardNumber;
// exception

$cardNumber->erase();
// remove value forever.

$cardNumber->get();
// get sensitive value and erase it

$cardNumber->peek();
// get sensitive value but do not erase it. use this method carefully

(string) $cardNumber;
// empty string

json_encode($cardNumber);
// {}

var_dump($cardNumber);
// does not print sensitive data
```

All supported gateways are aware of this class and will handle it safely.

Back to [index](/payum/readme.md).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://payum.gitbook.io/payum/working-with-sensitive-information.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
