GithubHelp home page GithubHelp logo

Comments (12)

peterjaap avatar peterjaap commented on September 20, 2024 1

@erfanimani noe that we have the 'delete' option, could you do a PR to add it to the default Magento 2 config?

from masquerade.

peterjaap avatar peterjaap commented on September 20, 2024 1

Sounds good, you can do that with the formatter: fixed formatter, see an example here:

from masquerade.

peterjaap avatar peterjaap commented on September 20, 2024

What tables/columns are those?

from masquerade.

peterjaap avatar peterjaap commented on September 20, 2024

I wrote the config yml based on what I saw in our clients' databases, and none of our clients use the Paypal option that comes with Magento (it's all through PSPs).

from masquerade.

erfanimani avatar erfanimani commented on September 20, 2024

Gotcha. I'll investigate which column it is next week. Possibly I can provide a PR myself. From memory however, I think payment information details aren't structured and are stored instead as a json or serialised value.

from masquerade.

peterjaap avatar peterjaap commented on September 20, 2024

We could add a custom formatter for that; https://github.com/elgentos/masquerade#custom-providers--formatters

from masquerade.

johnorourke avatar johnorourke commented on September 20, 2024

@erfanimani what's the use case for anonymising this over deleting it? (asking because I'm adding 'delete' options so that we can remove old sales data and reduce DB size for our dev environments, so it would be useful to know if there's a reason for keeping it)

from masquerade.

erfanimani avatar erfanimani commented on September 20, 2024

@johnorourke no reason! Both options would work.

from masquerade.

erfanimani avatar erfanimani commented on September 20, 2024

That's great, yeah I should be able to create a PR

from masquerade.

peterjaap avatar peterjaap commented on September 20, 2024

@erfanimani I just checked a Magento 2 open source database for Paypal and I found no personal identifiable information columns? We don't use Paypal through Magento's implementation (only through payment service providers) so I don't have real data in any of our projects in these tables so I can't be 100% sure.

mysql> show tables like '%paypal%';                                                                                                                                                                                                                                                 [15/251]
+---------------------------------------+                                                                                                     
| Tables_in_magento2m2 (%paypal%) |                                                                                                     
+---------------------------------------+                                                                                                     
| paypal_billing_agreement              |                                                                                                     
| paypal_billing_agreement_order        |                                                                                                     
| paypal_cert                           |                                                                                                     
| paypal_payment_transaction            |                                                                                                     
| paypal_settlement_report              |                                                                                                     
| paypal_settlement_report_row          |                                                                                                     
+---------------------------------------+                                                                                                     
6 rows in set (0.00 sec)                                                                                                                      
                                                                                                                                              
mysql> describe paypal_billing_agreement;                                                                                                     
+-----------------+----------------------+------+-----+-------------------+----------------+
| Field           | Type                 | Null | Key | Default           | Extra          |
+-----------------+----------------------+------+-----+-------------------+----------------+
| agreement_id    | int(10) unsigned     | NO   | PRI | NULL              | auto_increment |
| customer_id     | int(10) unsigned     | NO   | MUL | NULL              |                |
| method_code     | varchar(32)          | NO   |     | NULL              |                |
| reference_id    | varchar(32)          | NO   |     | NULL              |                |
| status          | varchar(20)          | NO   |     | NULL              |                |
| created_at      | timestamp            | NO   |     | CURRENT_TIMESTAMP |                |
| updated_at      | timestamp            | YES  |     | NULL              |                |
| store_id        | smallint(5) unsigned | YES  | MUL | NULL              |                |
| agreement_label | varchar(255)         | YES  |     | NULL              |                |
| agreement_data  | text                 | YES  |     | NULL              |                |
+-----------------+----------------------+------+-----+-------------------+----------------+
10 rows in set (0.00 sec)

mysql> describe paypal_billing_agreement_order;
+--------------+------------------+------+-----+---------+-------+
| Field        | Type             | Null | Key | Default | Extra |
+--------------+------------------+------+-----+---------+-------+
| agreement_id | int(10) unsigned | NO   | PRI | NULL    |       |
| order_id     | int(10) unsigned | NO   | PRI | NULL    |       |
+--------------+------------------+------+-----+---------+-------+
2 rows in set (0.00 sec)

mysql> describe paypal_payment_transaction;
+------------------------+------------------+------+-----+---------+----------------+
| Field                  | Type             | Null | Key | Default | Extra          |
+------------------------+------------------+------+-----+---------+----------------+
| transaction_id         | int(10) unsigned | NO   | PRI | NULL    | auto_increment |
| txn_id                 | varchar(100)     | YES  | UNI | NULL    |                |
| additional_information | blob             | YES  |     | NULL    |                |
| created_at             | timestamp        | YES  |     | NULL    |                |
+------------------------+------------------+------+-----+---------+----------------+
4 rows in set (0.00 sec)

mysql> describe paypal_settlement_report;
+---------------+------------------+------+-----+---------+----------------+
| Field         | Type             | Null | Key | Default | Extra          |
+---------------+------------------+------+-----+---------+----------------+
| report_id     | int(10) unsigned | NO   | PRI | NULL    | auto_increment |
| report_date   | date             | YES  | MUL | NULL    |                |
| account_id    | varchar(64)      | YES  |     | NULL    |                |
| filename      | varchar(24)      | YES  |     | NULL    |                |
| last_modified | timestamp        | YES  |     | NULL    |                |
+---------------+------------------+------+-----+---------+----------------+
5 rows in set (0.00 sec)

mysql> describe paypal_settlement_report_row;
+-----------------------------+------------------+------+-----+----------+----------------+
| Field                       | Type             | Null | Key | Default  | Extra          |
+-----------------------------+------------------+------+-----+----------+----------------+
| row_id                      | int(10) unsigned | NO   | PRI | NULL     | auto_increment |
| report_id                   | int(10) unsigned | NO   | MUL | NULL     |                |
| transaction_id              | varchar(19)      | YES  |     | NULL     |                |
| invoice_id                  | varchar(127)     | YES  |     | NULL     |                |
| paypal_reference_id         | varchar(19)      | YES  |     | NULL     |                |
| paypal_reference_id_type    | varchar(3)       | YES  |     | NULL     |                |
| transaction_event_code      | varchar(5)       | YES  |     | NULL     |                |
| transaction_initiation_date | timestamp        | YES  |     | NULL     |                |
| transaction_completion_date | timestamp        | YES  |     | NULL     |                |
| transaction_debit_or_credit | varchar(2)       | NO   |     | CR       |                |
| gross_transaction_amount    | decimal(20,6)    | NO   |     | 0.000000 |                |
| gross_transaction_currency  | varchar(3)       | YES  |     | NULL     |                |
| fee_debit_or_credit         | varchar(2)       | YES  |     | NULL     |                |
| fee_amount                  | decimal(20,6)    | NO   |     | 0.000000 |                |
| fee_currency                | varchar(3)       | YES  |     | NULL     |                |
| custom_field                | varchar(255)     | YES  |     | NULL     |                |
| consumer_id                 | varchar(127)     | YES  |     | NULL     |                |
| payment_tracking_id         | varchar(255)     | YES  |     | NULL     |                |
| store_id                    | varchar(50)      | YES  |     | NULL     |                |
+-----------------------------+------------------+------+-----+----------+----------------+

from masquerade.

erfanimani avatar erfanimani commented on September 20, 2024

Thanks for checking @peterjaap.

So I'm talking about this part here:

Screen Shot 2021-02-25 at 2 32 38 pm

It seems it's JSON serialised data stored in sales_order_payment/additional_information

It seems we can't truncate that table as it'll cause an error Call to a member function getAdditionalInformation() on null.

I can create a PR that adds a config to simply add an empty object in the additional_data column. It also has some cc fields it seems, but I don't think they're used. How does that sound? CC @johnorourke

from masquerade.

johnorourke avatar johnorourke commented on September 20, 2024

@erfanimani thanks :)

from masquerade.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.