Binance Chain Testnet airdrop or faucet programmatically - node.js

I'm looking for a way to get some Testnet tokens on Binance Chain (BNB Beacon Chain) programmatically. Currently the process for funding a Binance Chain Testnet account is rather round-about, having to first use the Binance Smart Chain Faucet and then manually doing a cross-chain transfer using Math wallet.
I'm building a wallet and would like to allows users to get some testnet tokens without going through this process and relying on other third-party tools. Is there a way to get them programmatically?
EDIT: As a matter of fact the situation is even worse, I can't even do it manually successfully. Math wallet hangs on the "Signing" transaction step, and Binance Wallet chrome extension just fails the transaction for cross-chain transfer.
How are people funding their Binance Chain Testnet accounts??

Related

Can a chaincode in hyperladger have its own certificate for signing transactions? If it can, then how

The task is to transfer assets from fabric to another blockchain. For the unlock/lock token contract, it is necessary to come up with a place to store tokens for the time of their blocking. I decided to store them on the client's account. The bottom line is, can I store data on in contact and can I assign a certificate to the contract as a user, for example as in eth? And the contract uses its own certificate when interacting with other contracts.
If there is documentation or code examples, I will be glad of any answers and examples. And then we have already entered a dead end.
Smart contracts in Fabric do not invoke other smart contracts in the way that I think you are describing. While a smart contract can use and invokeChaincode API call to invoke another smart contract, which is done within the scope of the current transaction and can only augment the read/write set of that transaction. If successful, this endorsement / simulation of the transaction is signed by the peer that received the transaction proposal from the client.
In short, smart contracts do not (or at least should not) interact with other smart contracts as if they are a client using their own client identity.
There is some documentation here that might help clarify:
https://hyperledger-fabric.readthedocs.io/en/release-2.2/developapps/chaincodenamespace.html#cross-chaincode-access

Can I make transactions on the user's behalf using some exchange API (Binance, Coinbase etc.)?

I've read the Binance API documentation but it's still not clear to me whether it allows for a 3rd party app to initiate a payment, and then just have the user confirm it.
For example, I want to build an application which would allow the user to send tokens to a previously defined address, but most of my user base won't have MetaMask or a hardware wallet (so it's not that straightforward like with using ethers.js or web3.js), they'll mostly keep their tokens on an exchange.
Also, if this can't be done through Binance, is there another exchnge that would enable this?
You can use the withdraw endpoint.
Docs: https://binance-docs.github.io/apidocs/spot/en/#withdraw-user_data

How to write an integration spec for Stripe Strong Customer Authentication

We're updating our applications integration of Stripe to use strong customer authentication. I want to test that our integration triggers the appropriate Javascript when the customer confirms using 3d secure.
The problem that I'm running into is that I'm using the same client secret in multiple tests and the modal will only appear the first time the client secret is used. This is an issue because I don't want to have to complete a full transaction by interacting with the frontend for every test just to test the SCA portion of the integration.
Does anyone know of a workaround for this?
#keoghpe, the successfully completed payment_intent client secret could not be reused. However, if you are using testing card such as (4000008260003178) https://stripe.com/docs/payments/cards/testing#regulatory-cards
This card number is Stripe testing card which simulates a payment failure. In this case, payment_intent's state machine will be kicked back to be requires_payment_method state which you could reuse the client secret again.

API to change the credit card used by a google wallet subscription?

Again I am frustrated by the lack of documentation involved in developing using Google Wallet as a payment gateway and I may switch to another service.
My new question is as follows:
Can I programmatically change the payment card utilized by a Google Wallet for digital goods subscription?
If a card utilized in a subscription expires, that is on the user, However, If I do not provide a means of changing the payment card elegantly, that is on me!
Does anyone know how this can be done? Or would I have to create a whole new subscription to produce this effect? This should be a basic feature of any payment gateway so I am assuming that I am missing something.
It should also be noted that creating a new subscription may be problematic without an ability to cancel the previous subscription via the API. Provided that both the old and new cards are still valid, it would attempt to process the payments for both subscriptions!
On a side note, why does it seem that the Google Wallet API is missing so many key features? (annual subscriptions, subscription cancellation, the issue mentioned above, etc...?)
Thanks again everyone!
If Google can't successfully charge, they'll send you a failure postback which you can use to evaluate what to do with the subscription.
It would be best if you don't equate Wallet to a "payment gateway" (or credit card processing service/gateway) because it isn't.
At the end of the day, Wallet basically gives you some "access" to a Wallet User's data. It's up to the Wallet users' to add/remove whatever payment instruments they have in their Google Wallet.
in Wallet for Digital, Google also handles the transaction - the processing part, so you're freed of any PCI compliance, and related payment infrastructure to get stuff going.
Instant Buy, Google will send you a "virtual card" for you to process the transaction using your own/existing credit card processor/gateway. In this case, you do have to be PCI compliant and have existing infrastructure.
In both cases, you don't have access to the actual Wallet users' payment data. Google locks that stuff down.
Hth....

Google wallet API Integration questions

I am new to integrate Google Wallet and there are some confusion and questions related to that given below:
Is it possible to add multiple items for Google wallet?
How to handle discount by API?
What's the parameter in JWT response on postback URL for success and failure transaction?
Is refund functionality available for a transaction by API call?
Anyone have idea about this. Thanks in advance.
Can you clarify which specific API (Instant Buy or Wallet for Digital)?
Is it possible to add multiple items...
Digital - no, you can however "bundle", see this post for clarification.
Instant Buy - it's just a "layer" on top of your (pre) existing purchase/ordering processes and handles (just) the payment data of a Google Wallet user. The "order details" is something you control. See sample of data you send.
Discounts by API
By API - no. You can pass whatever (pre-calculated) value in both APIs.
Success vs. Failure Postback
Digital - Google will only send HTTP Post to your server URL on successful transaction. See #5: "Google sends an HTTP POST message to the postback URL whenever a purchase completes..."
Instant Buy - not relevant. You are processing the transaction, unlike in Digital where Google is. Instant Buy in a nutshell provides your web site, secure access to a Google Wallet user's data. You need to have your own merchant account/processor, be PCI compliant, etc. That said, you will have the success or failure info that you actually have to send to Google - they need to know if you have successfully processed or not (yup, it's the other way around).
Refund by API
By API - Unless a Googler says otherwise, AFAIK, not at this time, for both APIs.
On that note, for Instant Buy, it's actually unclear to me how to "inform Google" when performing a credit or refund. Its still a "private API" (not GA) so I actually haven't seen its "guts". It's understood that since the merchant uses their own processor that a credit/refund is the same procedure, but letting Google "know" about it (days/weeks after the fact) is something I personally have no actual info on..sorry...I can assume some "button" in merchant center for Instant Buy, but that's just a guess....
Hth....
W.r.t InstantBuy Refunds:
The Refund happens on the virtual one time card that is returned by the Google API. The refund on the card can be done by using any backend payment processor. Once the refund is made to the card, it hits the user's backing card.

Resources