Hey everyone!
Let me start saying that I know this issue does not belong to react-coinbase-commerce integration, but I couldn't find any other place to ask my questions or contact support, so I was hoping if you guys can somehow answer my question or at least point me in the right direction.
Thank you!
The issue
We are adding a Payment Commerce Button in our website following this guide: https://docs.cloud.coinbase.com/commerce/docs/add-payment-button
We embedded the html <a> and <script> and everything works just fine.
The issue comes when we want to send some custom metadata (a user id) so when get a callback call in our backend, we can identify what user was doing the transaction.
According to the guide, we can add a data-custom attribute to the <a>, but when we get our backend call, metadata is always empty.
We tried 2 approaches, sending data-custom as an attribute (the site is build in Angular) and also I saw in this repo that react sends the metadata as a queryParam, so we also did that, but no luck
<a class="donate-with-crypto btn btn-sm btn-primary" [attr.data-custom]="customUserId"
href="https://commerce.coinbase.com/checkout/XXXXXXXXXXX?custom={{customUserId}}"
target="_blank">
<span>Add funds with Coinbase</span>
</a>
<script src="https://commerce.coinbase.com/v1/checkout.js?version=201807"></script>
Again, I would love to post this question in the right repo, but I couldn't find it, so any help would be much appreciated
Hey everyone!
Let me start saying that I know this issue does not belong to
react-coinbase-commerceintegration, but I couldn't find any other place to ask my questions or contact support, so I was hoping if you guys can somehow answer my question or at least point me in the right direction.Thank you!
The issue
We are adding a Payment Commerce Button in our website following this guide: https://docs.cloud.coinbase.com/commerce/docs/add-payment-button
We embedded the html
<a>and<script>and everything works just fine.The issue comes when we want to send some custom metadata (a user id) so when get a callback call in our backend, we can identify what user was doing the transaction.
According to the guide, we can add a
data-customattribute to the<a>, but when we get our backend call, metadata is always empty.We tried 2 approaches, sending data-custom as an attribute (the site is build in Angular) and also I saw in this repo that react sends the metadata as a queryParam, so we also did that, but no luck
Again, I would love to post this question in the right repo, but I couldn't find it, so any help would be much appreciated