bisq-network / bisq

A decentralized bitcoin exchange network
https://bisq.network
GNU Affero General Public License v3.0
4.71k stars 1.27k forks source link

Add payment method: Wechat #1354

Closed ManfredKarrer closed 6 years ago

ManfredKarrer commented 6 years ago

Investigate what is required for adding Wechat.

flix1 commented 6 years ago

https://en.wikipedia.org/wiki/WeChat#WeChat_Pay_payment_services

flix1 commented 6 years ago

You need:

  1. Account ID
  2. Time for payments
  3. Chargeback risk
  4. Method for arbitrator to review txs
abigail830 commented 6 years ago

When we plan to have this wechat payment method available? 👍

mrosseel commented 6 years ago

@abigail830 implementing wechat is not the big problem, the problem is that none of the developers have experience with nor access to wechat, so we're looking for active wechat users to help us gather information.

See the list made by @flix1 above on the kind of information we need. If you or someone you know is willing to do some investigations on wechat, post here and we'll explain in more detail what's needed.

Note: doing these kinds of analysis for bisq can get you a bounty in BSQ tokens for contributing

abigail830 commented 6 years ago

Sure I am grad to help on it!

Not quite sure which kind of charge back scenario you are talking about?

flix1 commented 6 years ago

Regarding chargebacks...

@abigail830 after you make a payment... can you cancel it?

We need to make sure that the person that sells bitcoins can be sure that once they receive the WeChat payment it cannot be cancelled by the buyer.... because if the buyer can cancel.. then scammers can abuse this feature to steal bitcoins from sellers.

Bisq can only use payment methods that have irreversible payments. (Or at least very hard to reverse).

ManfredKarrer commented 6 years ago

@abigail830 @flix1 What is the required data field for sending money? Email, phone nr., account ID? real name?

abigail830 commented 6 years ago

@flix1 , the payment could not be cancel once made.

'Made' means said I had either scan the receiver's QR code, or the shop scanned my wechat wallet QR code, then it should have a popup in wechat saying I am going to pay $$$ to this shop, then I confirm it by choosing a pre-setted card/e-wallet and also input the pwd or finger print. Right after this, nth could be cancel. (But it could be cancel before I input pwd or finger print, and in this case, this transaction would not display in the transaction history log)

abigail830 commented 6 years ago

@ManfredKarrer duiring the payment happen, it would only asking for pwd or finger print so it is very easy to use. All the card/account setting need to be done before trigger any payment.

1st, you could need to have real name authentication in wechat(said input name, ID card num), this is to ensure 'you are you'. And then you could also setup a 6 digit pwd for payment.

2nd, in wechat config, you could associate any debit/credit card(must under same ppl passed step1) to the wallet. Here would need to input name/card number/expiry date/cvv code(if credit card)/mobile num(which should be same as the num when you create this card in bank), and agree some terms, then would get 2 factor authentication via SMS, then card is added.

After this, you could also setup said which card using as default. Then its ready for any payment.

mrosseel commented 6 years ago

@abigail830 thanks for your input, here are some followup questions:

ManfredKarrer commented 6 years ago

Would be great to get a screenshot of photo of the payment screen (like here https://github.com/bisq-network/exchange/issues/1048#issuecomment-368045395). Translations of the text in the screen would be good as well...

abigail830 commented 6 years ago

Sure. I will send screen dump for all steps tmr ^o^

ManfredKarrer commented 6 years ago

@abigail830 So when you send money to another WeChat user what do you need to know? Email? user or account ID? phone nr?

ManfredKarrer commented 6 years ago

@abigail830 I will release in a few hours. If I get the required data needed I can add WeChat in that release. Next release might be in a few months as we want to focus on other work to get done (DOA) so i would appreciate to get WeChat into that release as well.

abigail830 commented 6 years ago

Let me try to answer one by one.

As said, when I want to use Wechat Pay, I would always need to pre-setup with adding my credit/debit card first. Then no matter I use those card for pay or deposit $$ from card into Wechat eWallet then pay with eWallet, I would always have a QR code to present my Wechat wallet. Same for other ppl/shop.

So till this moment, every one want to use wechat pay would have its own QR code, this step should be same as Alipay

abigail830 commented 6 years ago

Then when I try to pay, there are several different scenario:

Case 1. I may want to transfer $$ to my known Wechat friend:

Similar as facebook that I would always have a friend list.

  1. I would choose that ppl I want to transfer $$ to, choose 'Transfer', then it would ask for input the amount, then I would confirm and input password, then it would have a message prompt into that guy which is saying I transferred $$ to him/her(my balance would be reduce at this point).
  2. In this case, he/she would need to press that message to accept the money. After this I would also get the same notify saying he/she received. He/She's balance would only increase after accept it.
  3. If he/she NOT press to accept the money more than 3 days(depends on Wechat's policy, now should be 3 days), the money would be return back to my e-wallet and one notice would also inform me said $$ is came back.

Sample screen dump: I choose the friend and press 'Transfer' image Input the amount image Confirm the payment method(eWallet or using any credit/debit card added) and input pwd: image I sent the money to my friend: image She accept the money: image

abigail830 commented 6 years ago

Case 2. I need to transfer $$ to someone who is not my known friend. Said maybe I go lunch and need to pay to that restaurant.

In this case there are 2 ways to do, different shop have different preference:

Method1 is that restaurant would show me his Wechat wallet QR code, Wechat also provided function to scan QR code, after scan then it would show the same as of the 2nd screen dump above to ask me input amt and then confirm pwd. Once I confirm and input pwd, they would get the money and not need additional accept step.

Method2 is that I show my wallet QR code, they having a like POST machine to scan my code. Then I would get a notify saying they are going to charge me @@@ money, then I would still go on confirm and input pwd. Same that right after this, the shop would get my money and not need additional accept step.

abigail830 commented 6 years ago

Besides the face to face payment as above restaurant sample, it would also have case like I using Amazon/Taobao..etc external apps, then I need to trigger a payment. Usually those app would give a list of payment method(said as bisq). If I choose Wechat Pay, then those app would direct me to Wechat app with pre-set the agreed amount. What I need to do is same as screen dump3 just to confirm and input pwd.

I think these steps actually quite similar as Alipay.

abigail830 commented 6 years ago

One special config for Wechat. With new version Wechat(forget from which version), people would able to setup when the money really deposit to receiver.

Default setting is immediantly, other 2 choices are 2hr & 24hr. image

It means, said if I change my config to get 2hr delay to deposit to receiver. Then again I try to transfer 0.1 RMB to my friend, same steps for input amt and input pwd. Still she would get notify saying I transfer money to her. But when she press to accept, the 'status' code would become "confirmed, pending payment to account". my translation may not that precise, it means receiver confirmed he awared and agreed to accept the money, but that money is not yet really deposit to his wallet until 2hr later. You could see the status code showing in notify message is different: image

Same status would also available to check from transaction log: image

After 2hr, again another notify message would be shown and update to said $$ finally arrived.

abigail830 commented 6 years ago

Here is some help doc in English: https://pay.weixin.qq.com/wechatpay_guide/help_docs.shtml

I think it may more comprehensive. Pls check it out. I would also read through it to see if it is same understanding of mine(as I am using a personal acct while it is possible that commercial acct as resturant may have special feature)

ManfredKarrer commented 6 years ago

@abigail830 Thanks a lot! Unfortunately it was a bit too late for that release, but we will schedule it for the next release.

abigail830 commented 6 years ago

The development is done but just pending release?! If the code change in master branch with toggle off now or in any sub branch? If so I could take a look to learn about it ^o^

ManfredKarrer commented 6 years ago

No it is already released. If you could do the implementation would be great. Just search for Alipay and see where it is used and what need to be done. There are a few classes to create, protobuffer definition added, translation strings added...

mrosseel commented 6 years ago

@abigail830 no worries if you can't implement it, your information is also welcome. What we want is to know how to pay a stranger, so someone not in your contact list. You mention this is done by exchanging a QR-code. For Bisq, that's not ideal, so is there any way to convert this QR-code in an account name, or a string? Let's make it concrete: suppose I want to pay you via wechat and I don't know you, what can you post in this github issue so I can pay you? Only a QR-code?

flix1 commented 6 years ago

There are WeChat usernames, so you can add someone just with their WeChat ID.

meapistol commented 6 years ago

To pay a stranger on WeChat one can add the stranger as a friend using their WeChat ID (as flix1 says) which seems to be unique (it must be). After paying one can delete the stranger as a friend. To pay one must have a linked account with a bank in mainland China which excludes many expatriate Chinese. Chats on WeChat can be seen on the web-based interface also if the web and the phone are paired first. Chats made before the pairing are not seen on the web-based interface. We have not tested, but my Chinese friend strongly suspect that the transaction is also seen on the bank statements. I think WeChat will only be used by expatriate Chinese with a bank account on the mainland. Not an insignificant group of people. The input fields should include the WeChat ID. Mobile phone numbers abroad seems to work badly for identification.

abigail830 commented 6 years ago

Just found missing above discussion msg :-P

For pay to a stranger, said any hotel/canteen, I would not add them as friend but only scan QR code. But I would read through more Wechat doc to find out what happen behind that QR code(said whether they really be added as my friend but hidden? but I don't think so) Will let u all know if I got any finding after read through those weChat doc.

And in parallel I had download and reading the source code for bisq. And taking Alipay as a example to trace through how to add a new payment method. As its first time to check in detail so may take some time..hope I could catup with u all's speed soon later.

abigail830 commented 6 years ago

@ManfredKarrer maybe a stupid question...if there is any naming standard for the branch? said If I branch out from current latest master or from 0.6.7. Or if u already got any feature branch which is for wechat pay?

image

mrosseel commented 6 years ago

You should first fork before making a branch, so your branch name is in your own repo and not important

On Mar 2, 2018 04:15, "SaraQian" notifications@github.com wrote:

maybe a stupid question...if there is any naming standard for the branch? said If I branch out from current latest master or from 0.6.7. Or if u already got any feature branch which is for wechat pay?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/bisq-network/exchange/issues/1354#issuecomment-369807529, or mute the thread https://github.com/notifications/unsubscribe-auth/ABZb3th-keFED4HmzAVaSzl4SoEKbTjPks5taLlCgaJpZM4SEOZa .

abigail830 commented 6 years ago

@mrosseel ok~got it

ripcurlx commented 6 years ago

@abigail830 Just a heads up before you start any implementation. Make sure that you update on the latest master version as the build process was changed a lot. The easiest/safest way would be to checkout https://github.com/bisq-network/dao and follow the instructions within the https://github.com/bisq-network/dao/blob/master/README.md. After you have checkout out everything replace bisq-desktop with your fork and do a re-build (./gradlew build). From that point on, everything should run as expected. All translation files are now placed within the bisq-core repository. If you run into any issues please join our #dev channel on Slack.

flix1 commented 6 years ago

@ManfredKarrer can we also try to get WeChat into v. 0.7 ?

It should not be difficult, given the similarity to Alipay, Revolut, CashApp and other already existing options..

ripcurlx commented 6 years ago

@abigail830 Do you think you could join us today in our growth call? I'd love to talk with you on the requirements for Wechat and the Chinese Market.

ripcurlx commented 6 years ago

I could help out to implement Wechat for Bisq and if it is just about adding a WeChat ID it shouldn't be a lot of work. Just need proper translations (or I'll use Google Translate) and a confirmation if actually people are ok with the adding friend -> pay -> remove friend flow. @abigail830 @meapistol @flix1 Does adding a friend on WeChat has some other temporary implications like access to additional information on this user during that time?

abigail830 commented 6 years ago

@ripcurlx just found above message but the growth call link is 404? maybe I had missed it..I am just end a biz trip and back China, and found Bisq having lots changes, so I still checking whats changed in new version..

ripcurlx commented 6 years ago

@abigail830 Sorry my bad. This link should work: https://github.com/bisq-network/growth/issues/50 . The growth call will take place in less than 4 hours from now. Yes, lots of stuff changed. Maybe we can finalize the WeChat implementation in the next few days.

abigail830 commented 6 years ago

@ripcurlx when I try to clone it with 'mr checkout' as mentioned in procedure, I got permission deny issue. Anywhere I could setup my public key stuff?

Warning: Permanently added the RSA host key for IP address '13.229.188.59' to the list of known hosts. Permission denied (publickey). fatal: Could not read from remote repository.

If i just 'git clone' one of it, it still met the same, said 'git clone git@github.com:bisq-network/bisq.git bisq'

ripcurlx commented 6 years ago

Either you use the https url or you set up your public key for GitHub as described here: https://help.github.com/articles/set-up-git/

abigail830 commented 6 years ago

Sure I already have key setup long ago. So it working fine when 'git clone https://github.com/bisq-network/bisq', but only have issue when clone the inside project. Anything different?

ripcurlx commented 6 years ago

If you want to use the ssh urls like git@github.com:bisq-network/bisq.git bisq you have to configure and add your ssh key to github. If it still doesn't work you could edit the .mrconfig file in the root directory and change the urls into the https:// urls. e.g. https://github.com/bisq-network/bisq-desktop.git instead of git@github.com:bisq-network/bisq-desktop.git

[desktop]
checkout = git clone git@github.com:bisq-network/bisq-desktop desktop

into

[desktop]
checkout = git clone https://github.com/bisq-network/bisq-desktop.git desktop
ripcurlx commented 6 years ago

Here's detailed information how to use GitHub with ssh: https://help.github.com/articles/connecting-to-github-with-ssh/

abigail830 commented 6 years ago

Ah you are right! Just found it is using git@github.com. Replace to https is fine now :-)

ripcurlx commented 6 years ago

Great 👍 Do you think you can join us today for the Google Hangout? Maybe we can talk a little bit about the Chinese market, WeChat and if there is anything else we could do to make it more easy to trade within China.

ripcurlx commented 6 years ago

In the end you'll need forks of https://github.com/bisq-network/bisq-desktop, https://github.com/bisq-network/bisq-core and https://github.com/bisq-network/bisq-common. If you have any issues getting everything up and running please let me know either here or in our #dev or #bisq-desktop channel.

abigail830 commented 6 years ago

Just got my local workspace up and running. And checked the API doc for wechat, I found existing wechat actually not open any p2p API. All the API is specify for merchant/company/bank level. But I believe Alipay should be the same situation. So now is checking how is the alipay got implement previously in bisq. If you have any history doc/chat history I could refer to, that would be also great.

mrosseel commented 6 years ago

Bisq doesn't need an API integration with wechat. Just have a look at the alipay implementation for Bisq, all payment methods in Bisq help the user to make a MANUAL transfer of money. So usually this just means an account number, account name, etc. I don't have any history on e.g. alipay implementation, but take a look at 'AlipayForm'.

Another source of information is 'pb.proto' where all the network messages are defined. This is the message definition for an alipay account, indicating only an account number is needed to make an alipay transfer

message AliPayAccountPayload {
    string account_nr = 1;
}
abigail830 commented 6 years ago

@mrosseel , I got what you means now! So bisq does not help any further on the payment. Then yes I believe we just need a account name which same as Alipay. Then trader could add each other behind bisq. I had started to change in my fork.

I had raised PR for bisq-common: https://github.com/bisq-network/bisq-common/pull/17. Please kindly help to review.

After that, suppose I would need to rebuild bisq-p2p so that I could get the reflashed bisq-common, and then raise another PR for bisq-core(which also ready in my local). When all done, then last is to commit the change in bisq-desktop. Please kindly let me know if you found issue for this.

abigail830 commented 6 years ago

So far all dev work should be done and raised PR. Once all reviewed and merged then this issue could be closed

ripcurlx commented 6 years ago

@abigail830 Great! I'm looking at the PRs right now.