How can I send a transaction to pay for gas and send a second transaction in the same block to transfer tokens?
I see that it can be done. My wallet was stolen and I can’t take tokens from it because I put money on it and the scammer immediately withdraws from it.
enter image description here
Related
Is it possible using stripe to hold money on a saved card, but days later the time of card insertion?
E.G:
I need to save the card at certain moment (e.g day58) before completing the transaction and receiving the money. I also need to hold the money a week before it is finally sent through to me, in order to verify that it is available and block it to grant that they stay available until transaction, or knowing failure from that week before.
Stripe does support authorization and capture (or placing a hold on a card) which lets you hold funds for up to 7 days. They cover this in this guide: https://stripe.com/docs/payments/capture-later
The idea here is that you have 3 separate steps in your flow:
You collect card details securely with a SetupIntent since you're not accepting a payment immediately. See this guide: https://stripe.com/docs/payments/save-and-reuse
7 days before the service being delivered, you create a PaymentIntent for the correct amount. You pass capture_method: 'manual' to indicate you only want to hold funds for now. You also pass the customer and payment_method parameters corresponding to the details you collected at step 1 and you confirm the PaymentIntent. If there's a decline, you get your customer on session to provide different card details.
Before the 7 days are up, you explicitly capture the PaymentIntent via the API
I need to verify that user from my database has sent btc to my wallet.
Ideally I want to generate a unique address for each user transaction and then track all those addresses but I suppose it will be difficult to implement due to address gap limit, so I decided to just ask users for their bitcoin address and then expecting tx with funds transfer from that address to my wallet so I can verify funds were sent by them.
So let's say I want to track all txs just to my wallet address using my own bitcoin node .
As I understand, when I connect to node in live network I'll be notified about all txs that are happening in the network?
How can I validate transactions with transferring funds only to my wallet and decode address from which funds were transferred?
Are there some easy ways to implement this and maybe some code/project examples?
You should use ElectrumX protocol, its based on Satoshis Simple Payment Verification.
Its a server were you can subscribe to a Public Key so the client will receive a notification when the status of the 'script hash' changes using this method:
blockchain.scripthash.subscribe(scripthash)
You can read more on: https://electrumx.readthedocs.io/en/latest/index.html
I am growing frustrated with the lack of features and poor documentation of the Google Wallet for digital goods subscription API.
My question is the following:
If Google wallet sends a postback to my URL, and I do not acknowledge the payment (send status 200), does the payment get refunded or not appear on the card statement in the first place?
It seems rather strange that there is no way to programmatically cancel subscriptions. A work around would be to manage subscriptions on my end and only accept the postback payment if their subscription is valid. This would of course be frustrating to a user if they canceled a subscription, yet they still see a charge to their card and then a refund. I would like to avoid that.
Thanks in advance again everyone.
I'm not a Googler so this is subject to being crucified :)
To get an official response, it would be best to contact Google directly - you should see a "HELP -> Contact Us" in your Wallet Merchant Center.
Important: If you specify a postback URL, your server must respond promptly and correctly to the HTTP POST messages that Google sends for each transaction. Otherwise, the transaction will be canceled.
REF: Official documentation on handling postbacks
This somehow/probably relates to the old question in credit card processing of the difference between an AUTHorization and an CHARGE (aka "capture").
An AUTH for x amount would need to be sent for processing. Otherwise, how would Google send you a positive result for the transaction (aka Google would send you a postback after such successful "Auth" transaction for x amount - re: does account have enough funds to cover x)?
So there would be a "pending AUTH" for x value on card holders' account, subject to "capture" (finalizing, turning that AUTH into a CHARGE) at some later time (perhaps after you successfully acknowledge the postback).
What Google does (e.g. "Void" or "never capture") to that pending AUTH if you don't acknowledge (aka "...transaction will be cancelled"), or whether or not the above scenario is actually what occurs in Wallet for Digital Goods, can only be answered by Google. The above is only a personal (mine and mine alone) insight to standard credit card processing...
Hth....
I would like to implement a guarantee payment system on a website I'm working on. By that I mean that the user would insert his credit card information but no money would be drawn from it at the moment he does so. The money could only be drawn if the client does not show up at the hotel to actually pay for it. In that case the owner should be able to get some amount back. I was looking at Braintree payments but haven't found anything in their doc mentioning a system like this. How should I go about it?
You want to do an Auth Only transaction. Auth Only transactions are very similar to Authorize & Capture transactions except the transaction is not captured. The merchant is issued a six digit authorization number indicating that the funds are available and the transaction is approved. However, the merchant will not receive those funds until they capture the transaction.
Authorizations are only valid for up to 30 days from when they are issued and for up to the amount they were authorized for. For example, if an authorization was obtained for $100, the merchant may use this authorization for any transaction up to $100 for that customer. However, they cannot go over $100 with that authorization number.
An Important thing to note is that the funds from authorizations are frozen on a customer's credit card and cannot be access by that customer. From the customer's point of view, that money is essential spent. Authorizations should not be used without a customer's consent and with care.
Authorizations are captured when a Force transaction is processed.
I think that the Dwolla API sends the wrong transaction ID in notifications. In a normal dwolla money transaction, two transaction IDs are created (this is weird to me, but that's how dwolla does it). Because these two are created at the same time, they are always (in my experience) consecutive numbers.
So e.g. if account X sends money to account Y, Y will see transaction id M, and X will see transaction id M+1.
But Dwolla's notification webhook will send Y details of the transaction with id M+1. While ID M+1 is still unique to this transaction, ID M+1 cannot be used by Y via the API - because M+1 is supposed to only be used by X.
Here is a specific example:
Via my webapp, I send money from my personal dwolla account to my organization's via the off-site gateway api.
My webapp is sent the transaction details in both callback and notification form. The transaction id generated by step 1 is 1431566. This is the transaction id sent to both callback and notification. My web app stores this Id for future use.
Via my webapp, I decide to refund my personal dwolla account from my organization's so:
My webapp tries to query dwolla about transaction 1431566, to get the SourceId, but this fails - dwolla reports "Transaction not found for account". My automatic refund cannot continue without an ugly kludge like subtracting one from the Id and trying again.
The manual workaround is to login to my organization's dwolla account via the web interface. Here I can look for the transaction based on datetime and I can see that the transaction ID is actually 1431565 (correctly reported in the web interface). If I go into my organization's database and replace 1431566 with 1431565, I can repeat step 4 and it works this time. After that I can initiate a send() and the refund goes through.
I reported the same problem here before dwolla moved support to stackoverflow: https://getsatisfaction.com/dwolla/topics/callback_and_webhook_notification_sent_wrong_transaction_id_off_by_one
I figure it will be fixed faster if other people have the same problem. Or maybe I'm missing something obvious and someone will point it out.
Thanks to Michael's help, we were able to get around this issue by using the receiver's OAuth token when getting the transaction details instead of the sender's OAuth token.
For example, say I send some money using the API and transactions 1202 for the money sender and 1201 for the money receiver get created. If you make the API call to get details for transaction 1202 but use the receiver's OAuth token, it will give you details for transaction 1201, including fee information.
I'm not sure if the situation is exactly the same since we are acting as the facilitator between two transactions, so no guarantees that this will work in your situation. But it's worth a try.
So, your application's key & secret can access the transaction ID posted to you by passing the transactionById() method your application's client_id and client_secret, as opposed to the oauth_token. Meaning, when you poll for the transaction, instead of querying this URL:
https://www.dwolla.com/oauth/rest/transactions/{transaction_id}?oauth_token=x
Query this url, instead:
https://www.dwolla.com/oauth/rest/transactions/{transaction_id}?client_id=x&client_secret=y
Makes sense?