Closed danvass closed 8 years ago
Feel free to talk here so others who may have the same questions can see it as well. If it's personal, then you can mail me: justin at boxc dot com
Thank you very much for the prompt response. I'll make use of this here!
In order to obtain the partner ID, api secret etc. I need to have an AliPay merchant account right? Are these merchant account only available through the Chinese service not global?
Additionally, do you happen to know of any attempts at making english documentation for AliPay? From my understanding there are two types, a Chinese one and a global one. The Chinese service caters for Chinese to Chinese payment through AliPay and global for foreign accounts to Chinese. I have only found information on the global one and so am struggling to find any details about setting up AliPay for use in China - this repository is the best I have found (and without it I would be completely lost).
Is it possible to test it works without conducting real payments?
Thank you very much - hopefully these questions will be able to help others too, Daniel
The merchant accounts are available through http://global.alipay.com. This allows businesses from outside China to collect payments from Chinese citizens. There is a process to become qualified and it does cost a good sum of money. I don't know how it's done for China-to-China payments, but I imagine it's not too different of an API.
Stripe also supports Alipay express checkout and recurring payments now. It may still be in beta testing, but it's probably your easiest solution for handling Alipay. I've tested it and it works seamlessly. If you have a lot of revenue then using Alipay directly could shave 1% off your transaction fees.
When I first set this up, there was not a sandbox to test, but I believe there is now a test environment (not reflected in this repo). You can check the documentation for testing info they let you download at https://globalprod.alipay.com/order/integrationGuide.htm
Oh okay, so this here is for business outside of China to collect payments? It doesn't support just China to China?
Do you know what difference there is between the two?
It is mentioned in their doc that http://mapi.alipay.net/gateway.do? should be used for testing while http://mapi.alipay.com/gateway.do? id for production.
Although when I try calling sample requests given in the doc that I downloaded from their site, gives results like this. http://mapi.alipay.net/gateway.do? -- gives browser error as couldn't connect to server http://mapi.alipay.com/gateway.do? -- it responds as Illegal_Partner error, which I can not rectify as I do not have a contract with them. What should I do?
@DVassilev I'm almost certain it does support China-to-China transactions because we had set up a business in China to collect payments via Alipay using the same API. But I think there may be a separate API available just for China-to-China transactions with lower transaction fees. I don't use Alipay directly any more since Stripe supports it, so I recommend talking to Alipay customer support.
@umeshmahato I just tested what you're talking about and I am also getting the same error. It looks like their test server is not working. Hopefully, it will be fixed soon.
I'll be updating the repo soon to reflect the new Global documentation.
Hi, one more thing I'd like to ask. I placed an order and paid using alipay. After that I was redirected to chckout/success page. So far I think everything is correct. I checked in the admin panel one status was added i.e. 'Customer was redirected to Alipay'. But that's about it.
In your notifyAction() there are some other messages also such as '买家已付款,交易成功结束'. Why these messages not get added to the order history in the admin panel?
@endsequence I'm not sure which admin panel you're referring to. This may be an issue with Alipay which has hopefully been fixed in the past year.
@bitmash, I wasn't able to get connection with forexprod.alipay.net. It's showing
Secure Connection Failed
The connection to the server was reset while the page was loading.
The page you are trying to view cannot be shown because the authenticity of the received data could not be verified.
Please contact the web site owners to inform them of this problem.
Are you able to make test? I have added alipay test IP to my hosts list. But still not working.
115.124.16.152 forexprod.alipay.net
@jibon57 The API endpoints have changed. They should be: https://openapi.alipaydev.com/gateway.do (sandbox) https://mapi.alipay.com/gateway.do (prod)
Check this repo's README.md file for the sandbox credentials.
Thanks for your reply @bitmash. Yes, I made the correction but do you know why I can't create any transaction. I am getting this error:
创建交易错误
输入参数错误!
您可能需要: 返回支付宝首页
It's showing error here: https://forexprod.alipaydev.com/payError.htm?funCode=FUN.TRADE&webErrorCode=TRADE.ILLEGAL_ARGUMENT&hiddenErrorMask=ILLEGAL_ARGUMENT
Have you faced same problem? Or any suggestion
@jibon57 I faced a similar problem. Can you provide the request parameters you're sending (sandbox credentials only)?
I am using your same test file. I didn't modified anything except the ending point url.
@bitmash, They have their own PHP SDK. You can check from here: https://global.alipay.com/product/websitepayment.htm PHP code: https://os.alipayobjects.com/others/create_forex_trade.zip Enjoy :)
Hi,
I'm interested in using AliPay in a website but I am unsure about the exact implementation. Would it be possible to contact you via email about some questions?
Thanks, Daniel