- Posts: 80
- Thank you received: 1
AliPay for Hikashop
Any chance to get an AliPay payment plugin for Hikashop any soon? I think this would open the whole Chinese market!
Regards,
SeoWeb
Please Log in or Create an account to join the conversation.
- Posts: 12953
- Thank you received: 1778
We somehow managed to develop the alipay plugin but we don't have any test account, so if someone can test it for us, it would be great.
Regards,
Mohamed Thelji
Please Log in or Create an account to join the conversation.
Regards,
SeoWeb
Please Log in or Create an account to join the conversation.
No matter what settings I use for the plugin I get the error message:
调试错误,请回到请求来源地,重新发起请求。
错误代码 ILLEGAL_PARTNER_EXTERFACE
说明:如果您不是因为本接口集成调试而看见该错误提醒,请联系本次请求来源网站,本错误属于网站集成接口的错误。
with a link to the documentation page: help.alipay.com/lab/index.htm?src=yy_reach_error where I can search using the string ILLEGAL_PARTNER_EXTERFACE.
There is only one relevant result for this term: help.alipay.com/lab/help_detail.htm?help...AL_PARTNER_EXTERFACE
Also there is another article saying that it might be that some of the AliPay Sellers features are not enabled (instant payment processing may be?)
www.oschina.net/question/163899_23976
We will check our Seller account to make a picture a bit clearer.
Will let you know...
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
- Posts: 12953
- Thank you received: 1778
This plugin is designed for a Third Parties processing, concerning your error message if you have correctly set your plugin it might be caused by the redirection link to the alipay's payment page or by your alipay's account setting.
If you can share your alipay's account or just your Partner ID and Security code by mp, it would help us a lot.
Please Log in or Create an account to join the conversation.
现在支付宝公司给了用户三种接口:
1。快速付款(即时到账接口): service="create_direct_pay_by_user" 。
2。标准实物双接口(标准双接口): service="trade_create_by_buyer"
3。纯担保交易接口(担保接口): service="create_partner_trade_by_buyer"
Please note, there is no way to use instant payment (first one in a list) if the company in not registered in China.
I was informed that we use the create_partner_trade_by_buyer method. But when i change this in a alipay.php lile "service" => "create_partner_trade_by_buyer", I get an error ILLEGAL_ARGUMENT .
Unfortunately I can not share it with you, because they belong to live account and not Sandbox one, sorry. But I will be happy to continue testing following your instructions and reporting back about the results.
Please Log in or Create an account to join the conversation.
- Posts: 12953
- Thank you received: 1778
Thank you very much for your help SeoWeb
Can you test it like this please ?
$order_params = array(
"service" => "create_partner_trade_by_buyer",
"payment_type"=> "1",
"partner" => $method->payment_params->Partner_ID,
"seller_email" => $method->payment_params->email,
"return_url" => $return_url,
"notify_url" => $notify_url,
"_input_charset" => "utf-8",
"out_trade_no" => $out_trade_no,
"subject" => "order_name",
"body" => 'order number : '.$out_trade_no,
"total_fee" => $order->order_full_price
);
Please Log in or Create an account to join the conversation.
Thanx for the code. Just tested and have got an error message:
抱歉,无法完成付款!
交易信息有误,请重新核实交易详情再付款。
错误代码:ILLEGAL_ARGUMENT
Is it possible there is something missing? Here is the sample code AliPay provides to the developers:
$parameter = array(
"service" => "create_partner_trade_by_buyer",
"payment_type" => "1",
"partner" => trim($aliapy_config),
"_input_charset" => trim(strtolower($aliapy_config)),
"seller_email" => trim($aliapy_config),
"return_url" => trim($aliapy_config),
"notify_url" => trim($aliapy_config),
"out_trade_no" => $out_trade_no, //generated by Hika
"subject" => $subject,
"body" => $body,
"price" => $price,
"quantity" => $quantity,
"logistics_fee" => $logistics_fee,
"logistics_type" => $logistics_type,
"logistics_payment" => $logistics_payment,
"receive_name" => $receive_name,
"receive_address" => $receive_address,
"receive_zip" => $receive_zip,
"receive_phone" => $receive_phone,
"receive_mobile" => $receive_mobile,
"show_url" => $show_url
);
As you can see there are more paramitres in that array. May be AliPay needs more?
Please Log in or Create an account to join the conversation.
- Posts: 12953
- Thank you received: 1778
Can you test it like this please ?
$order_params = array(
"seller_email" => $method->payment_params->email,
"service" => "create_partner_trade_by_buyer",
"partner" => $method->payment_params->Partner_ID,
"return_url" => $return_url,
"notify_url" => $notify_url,
"_input_charset" => "utf-8",
"subject" => "ORDER FROM YOUR WEBSITE",
"body" => 'order number : '.$out_trade_no,
"out_trade_no" => $out_trade_no,
"payment_type"=> "1",
"total_fee" => $order->order_full_price,
"logistics_type"=>"EXPRESS",
"logistics_fee"=> 0,
"logistics_payment"=>"BUYER_LOGISTIC_PAY",
'receive_name' => "ORDER RECEIVER",
'receive_address' => "ADRESSE",
'receive_zip' => "69150",
'receive_phone' => "0600000000"
);
The "Quantity" and "price" are not needed if you set the "total_fee"
Please Log in or Create an account to join the conversation.
抱歉,无法完成付款!
交易信息有误,请重新核实交易详情再付款。
错误代码:ILLEGAL_ARGUMENT
Please find the sample code provided by Alipay. If you ajust the alipay.config.php for both Seller and Buyer with correct account details everything will work fine!
Please log in or register to see it.
Please Log in or Create an account to join the conversation.
- Posts: 12953
- Thank you received: 1778
Moreover, I made a few mistake in my previews script, "logistic_fee" should be like this :
"logistics_fee"=> "0.00"
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
- Posts: 12953
- Thank you received: 1778
And if it is doesn't work can you replace in alipay_end.php :
this line :
<form id="hikashop_alipay_form" name="hikashop_alipay_form" action="<?php echo $alipay_link; ?>" method="get">
by this line :
<form id="hikashop_alipay_form" name="hikashop_alipay_form" action=" mapi.alipay.com/gateway.do?_input_charset=utf-8 " method="get">
Please Log in or Create an account to join the conversation.
1. When I have deleted the old plugin, installed the new version and ran a test using first configuration I have got an error:
调试错误,请回到请求来源地,重新发起请求。
错误代码 ILLEGAL_SIGN
说明:如果您不是因为本接口集成调试而看见该错误提醒,请联系本次请求来源网站,本错误属于网站集成接口的错误。
2. I then replaced the line
<form id="hikashop_alipay_form" name="hikashop_alipay_form" action="<?php echo $alipay_link; ?>" method="get">
with
<form id="hikashop_alipay_form" name="hikashop_alipay_form" action="mapi.alipay.com/gateway.do?_input_charset=utf-8" method="get">
I ahve got this error message:
Not Found
The requested URL /newsim/checkout/step/mapi.alipay.com/gateway.do was not found on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
I think the action=" mapi.alipay.com/gateway.do?_input_charset=utf-8 " is not correct so I have changed it to action=" mapi.alipay.com/gateway.do?_input_charset=utf-8 "
and have got the same error message:
调试错误,请回到请求来源地,重新发起请求。
错误代码 ILLEGAL_SIGN
Any idea?
Please Log in or Create an account to join the conversation.
- Posts: 12953
- Thank you received: 1778
1. Can you please replace in alipay_end.php :
this line :
<form id="hikashop_alipay_form" name="hikashop_alipay_form" action="<?php echo $alipay_link; ?>" method="get">
by this line :
<form id="hikashop_alipay_form" name="hikashop_alipay_form" action="<?php echo $alipay_link; ?>" method="POST">
==> tell me the result
2. Replace in alipay_end.php :
this line :
<form id="hikashop_alipay_form" name="hikashop_alipay_form" action="<?php echo $alipay_link; ?>" method="get">
by this line :
<form id="hikashop_alipay_form" name="hikashop_alipay_form" action=" www.alipay.com/cooperate/gateway.do ?" method="get">
==> tell me the result
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
by this line :
<form id="hikashop_alipay_form" name="hikashop_alipay_form" action="<?php echo $alipay_link; ?>" method="POST">
==> did not get any errors, was able to pay successfully, and when AliPay was redirecting back to my website to report the cussessfull sale it was requestinf the https connection. We do not have SSL installed, so which part of the code I need to change to get the return url with http: in it?
Update:
Once I have changed the $httpsHikashop = str_replace('http://','https://', HIKASHOP_LIVE); to $httpsHikashop = str_replace('http://','https://', HIKASHOP_LIVE); I did not receive any errors at all, which is a good sign :-), but I can only see the blank page which is generated using this URL:
Please note some parts in a url are being replaced with _hidden_ .
We are almost there!!!
Please Log in or Create an account to join the conversation.
- Posts: 12953
- Thank you received: 1778
line 72-73 :
$notify_url = $httpsHikashop.'index.php?option=com_hikashop&ctrl=checkout&task=notify¬if_payment=alipay&tmpl=component&lang='.$locale;
$return_url = $httpsHikashop.'index.php?option=com_hikashop&ctrl=checkout&task=notify¬if_payment=alipay&tmpl=component&user_return=1&lang='.$locale;
by :
$notify_url = HIKASHOP_LIVE.'index.php?option=com_hikashop&ctrl=checkout&task=notify¬if_payment=alipay&tmpl=component&lang='.$locale;
$return_url = HIKASHOP_LIVE.'index.php?option=com_hikashop&ctrl=checkout&task=notify¬if_payment=alipay&tmpl=component&user_return=1&lang='.$locale;
by the way, can you replace $order_params by :
$order_params = array(
"seller_email" => $method->payment_params->email,
"service" => "create_partner_trade_by_buyer",
"partner" => $method->payment_params->Partner_ID,
"return_url" => $return_url,
"notify_url" => $notify_url,
"_input_charset" => "utf-8",
"subject" => "ORDER_FROM_YOUR_WEBSITE",
"body" => 'order number : '.$out_trade_no,
"out_trade_no" => $out_trade_no,
"payment_type"=> "1",
"price" => $order->order_full_price,
"quantity" => "1",
"logistics_type"=>"EXPRESS",
"logistics_fee"=> "0.00",
"logistics_payment"=>"BUYER_PAY",
);
==> tell me if it works
Please Log in or Create an account to join the conversation.