baijianpeng VIP
Total posts: 239
13 Jun 2016 06:19

Thank God, after a lot lot of hard work, finally I got the license to use Alipay payment gateway on my website. Then, this is the first chance I got to really test with Alipay payment plugin of Emerald on my production website.

Well, then I made a test today and got following result ( I choose "direct pay by user" method when setting up the plan) :

The user can see Alipay button and he can smoothly finish the transaction after click on that button. When payment succeeded, Alipay gateway returned this user to his subscription history page on my website. Till now, it seems all good.

But, one thing is not good: on the subscription history page, it shows that the subscription was NOT activated yet.

I switch to Admin user account and checked the Emerald frontend dashboard, there shows this newly created subscription on the "wait for activation" list.

Apparently this is a bug. Because Alipay is an Online Payment gateway, when payment finished through this gateway, that means the vendor has got the money, and the buyer should be granted that subscription immediately and automatically.

Please improve this payment gateway plugin.

PS:

I also found several other things need to be improved on this plugin:

  1. There are two "demo mode" option;
  2. The payment method options are not in language file.
  3. Is it possible to bring the user to the download page where he had started the buying process? I think the user want to "let me download the file immediately after payment", instead of redirect him to the subscription history page. He can find the history page anytime when he hover his mouse on the "user menu", but he can not find the download page for that file easily if there are a lot of files and belong to different plans respectively.

Last Modified: 07 Dec 2016


Sergey
Total posts: 13,748
16 Sep 2016 11:34

these 2 questions

Sergey

  • If returned parameter for example 'discount' => '0.00' should it be part of the signature? it is there but it is 0?
  • If parameter is 1.00 in the string that is encoded it should be &total_fee=1.00 or &total_fee=1?
  • are not related to Joomla at all. The matter now is that we cannot confirm hash. And I have some wiestions regarding that. It have nothing to do with Joomla, drupal or anything else. It is rure Alipay API questions. I'll try to make my questions more clear.

    1. One of the parameters that are returned from Alipay is discount. When I create hash to confirm I have to use parameters that are sent. I am not sure if I have to use this parameter or not. Because it is equal 0. Like so discount=0.00. So it is there but it is 0. Should I append it also like ...&discount=0.00
    2. Also php conver strins to integers. For example one of the parameters Alipay returns is total_fee for example it sends total_fee=1.00. When I get its value by PHP it change 1.00 to 1. So when I create hash to confirm and buils string it adds total_fee=1. Is it ok or it should be total_fee=1.00?

    In the mean time, For you I can temporary turn off hash check so that all orders automaticaly processed.


    baijianpeng VIP
    Total posts: 239
    24 Oct 2016 08:33

    hi, Sergey,

    You know, it is very difficult to persuade support staff of alipay.com to come here and read your above questions in last post.

    Today one of them read it, and replied in Chinese language to me:

    回调验签的话 就是你们把接收到的数据里面去除sign_type和sign值 剩下的做待签名字符串 然后用验签代码 那sign值 待签名字符串 支付宝公钥进行验签

    Let me try to translate it into English:

    For signature, you should remove "sign_type" and "sign value" from the received data, and use the rest as the string pending for signature. Then use the verification code to sign the pending string, use Alipay Public Key to verify and signature

    Sorry, since I am not a programmer, maybe my translation is wrong. But the point is: he confirms that Alipay API is CORRECT, otherwise, they will get error reports from other users, but not.

    So I hope you check your code again.

    In order to help you understand the Alipay gateway, I asked that support staff to point out "which DEMO package is right for this situation", he give me following URL:

    http://aopsdkdownload.cn-hangzhou.alipay-pub.aliyun-inc.com/demo/alipaydirect.zip?spm=a219a.7629140.0.0.fQ2VVU& ;file=alipaydirect.zip

    Please download this official DEMO package, you will find code for PHP langauge inside.

    If you can not download, tell me, I can send it via email to you.

    Thank you.


    baijianpeng VIP
    Total posts: 239
    24 Oct 2016 09:05

    Well, I stil worry that the former translation about Alipay staff's reply is not correct. So I asked another support staff, and he gave me a detailed explanation about "signature", in Chinese language, on an image:

    alipay-reply

    Please spare some time to solve this issue. My Emerald is nearly useless if I can not use Alipay on it. This issue had cost me about 6 months discussing here, but still not solved.

    If you need the text version of above documentation, please visit:

    https://doc.open.alipay.com/docs/doc.htm?treeId=64& ;articleId=104741&docType=1

    Thank you.


    baijianpeng VIP
    Total posts: 239
    18 Nov 2016 03:12

    Thanks to Sergey, under your help, the Alipay payment gateway plugin now seems works fine.

    I am running a "Alipay gateway test" on my live website. After some tests, if there is no errors, I will enable it for all my plans.

    Thank you for your efforts and great support!


    Sergey
    Total posts: 13,748
    21 Nov 2016 15:58

    You have scared hell out of me!!!

    When I sow that there is new comment on this topic, for a fraction of second I tough that it would be better for me never even exist :))

    You are welcome.


    baijianpeng VIP
    Total posts: 239
    02 Dec 2016 00:15

    :))

    I must reply to confirm that this issue had been solved by YOU.

    Thank you very much!

    I will introduce Emerald to EVERY Joomla user in China.


    Sergey
    Total posts: 13,748
    07 Dec 2016 11:29

    baijianpeng I will introduce Emerald to EVERY Joomla user in China.

    Even if onlu 0.00000000001% of Joomla users in Chine use Emearld, that will change everything! Thank you very much for your patients.

    Powered by Cobalt