Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(connector): Use
ConnectorError::InvalidConnectorConfig
for an invalidCoinbaseConnectorMeta
#3168fix(connector): Use
ConnectorError::InvalidConnectorConfig
for an invalidCoinbaseConnectorMeta
#3168Changes from 7 commits
dbfa22a
276b1d4
40c78ea
109e330
12f0664
cd400bd
9352adb
9c11db9
1f14cb3
54cf926
3e83c44
0bc0674
7154951
f1f1ca2
0fa74d2
f4e1512
5df2ef4
56d7303
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This changes will impact previous merchants who are using coinbase, This PR needs data migrations. Could you please refer #2746 description for more info.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Issue#2899 does not mention any data migrations.
I've checked that #2746, and in that case, the migration involved replacing
terminalId
withterminal_id
due to the removal of#[serde(rename_all = "camelCase")]
here.However, my issue is different. If I understand correctly, this issue is about empty JSON for
CoinbaseConnectorMeta
or the absence of thepricing_type
attribute in the JSON, and the goal is to add validations to prevent storing invalidCoinbaseConnectorMeta
.So, I am not sure about the migration here. If empty JSON or JSON without
pricing_type
is stored, how should the migration to the correctCoinbaseConnectorMeta
be handled? What value should be set forpricing_type
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No worries, We will take this up as these are data migrations. FYI, I was talking about existing merchants, we need to add
pricing_type
in metadata and set it to empty string. In that case, when merchant tries to make payment connector throws error and they are expected to update the metadata.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@srujanchikke aha, ok, thank you, make senses now, so I prepared migration script and simple test demonstration that it works, please see PR description.