- Posts: 2
- Thank you received: 0
alipay return_url and notify_url seems have issue
- aotogou@gmail.com
-
Topic Author
- Offline
-- Joomla version -- : 3.4.0
-- PHP version -- : 5.3.3
-- Browser(s) name and version -- : Chrome Version 42.0.2311.135 (64-bit)
Hi there,
I'm using alipay payment method for by website. Trade can be made after redirected to alipay website.
However, the order status is not updating after redirected back to my site, although the message like "Thank you for your purchage @ xxxxx" is displaying properly.
I looked into the code, not sure if I found out the cause of issue or not:
In the return_url or notify_url of alipay, they're:
$notify_url = HIKASHOP_LIVE.'index.php?option=com_hikashop&ctrl=checkout&task=notify¬if_payment=alipay&tmpl=component&lang='.$this->locale.$this->url_itemid;
and
$return_url = HIKASHOP_LIVE.'index.php?option=com_hikashop&ctrl=checkout&task=after_end&order_id='.$order->order_id.$this->url_itemid;
They both have query string. However, in the integration document officially provided by alipay, says the reture_url or notify_url can't have query strings. Maybe that's why the order status from alipay seems not being read, and error email saying "An Alipay notification was refused because the response from the Alipay server was invalid" continually occurs.
I'm not sure how do you control this return_url and notify_url issue for alipay, so I'm trying to get help here.
Thanks for your time.
Regards,
Yang
Please Log in or Create an account to join the conversation.
- Posts: 12953
- Thank you received: 1778
Can you :
- Use that last Alipay version
- Set the Alipay "Debug" option to YES
- Test it again
- Show me your Payment log file content.
You'll be able to check your payment log file through "Hikashop->System->Configuration->Main" by using the "See the report" button of your Payment log file option.
Please Log in or Create an account to join the conversation.
- aotogou@gmail.com
-
Topic Author
- Offline
- Posts: 2
- Thank you received: 0
Here's the log:
*************************
-- 05.15.15 23:16:08 --
Array
(
[option] => com_hikashop
[ctrl] => checkout
[task] => notify
[notif_payment] => alipay
[tmpl] => component
[lang] => en
[Itemid] => 329
[discount] => 0.00
[payment_type] => 1
[subject] => order number : 64
[trade_no] => 2015051500001000320058924060
[buyer_email] => lliyyang2@163.com
[gmt_create] => 2015-05-15 21:15:56
[notify_type] => trade_status_sync
[quantity] => 1
[out_trade_no] => 64
[seller_id] => 2088912559319093
[notify_time] => 2015-05-15 21:15:56
[trade_status] => WAIT_BUYER_PAY
[is_total_fee_adjust] => Y
[total_fee] => 0.01
[seller_email] => aotogou@gmail.com
[price] => 0.01
[buyer_id] => 2088002454394320
[notify_id] => ff0df07f91155fd66ebcf418aa656d6a3s
[use_coupon] => N
[sign_type] => MD5
[sign] => 761158796dd03684546bf971e591f541
)
-- 05.15.15 23:16:08 --
stdClass Object
(
[order_id] => 64
[order_billing_address_id] => 22
[order_shipping_address_id] => 22
[order_user_id] => 11
[order_status] => created
[order_type] => sale
[order_number] => C6U4
[order_created] => 1431695527
[order_modified] => 1431695527
[order_invoice_id] => 0
[order_invoice_number] =>
[order_invoice_created] => 0
[order_currency_id] => 38
[order_full_price] => 0.01000
[order_tax_info] => Array
(
)
[order_discount_code] =>
[order_discount_price] => 0.00000
[order_discount_tax] => 0.00000
[order_payment_id] => 2
[order_payment_method] => alipay
[order_payment_price] => 0.00000
[order_payment_params] =>
[order_shipping_id] =>
[order_shipping_method] =>
[order_shipping_price] => 0.00000
[order_shipping_tax] => 0.00000
[order_shipping_params] =>
[order_partner_id] => 0
[order_partner_price] => 0.00000
[order_partner_paid] => 0
[order_partner_currency_id] => 0
[order_ip] => 115.64.108.79
[order_site_id] =>
)
-- 05.15.15 23:16:08 --
stdClass Object
(
[order_id] => 64
[order_billing_address_id] => 22
[order_shipping_address_id] => 22
[order_user_id] => 11
[order_status] => created
[order_type] => sale
[order_number] => C6U4
[order_created] => 1431695527
[order_modified] => 1431695527
[order_invoice_id] => 0
[order_invoice_number] =>
[order_invoice_created] => 0
[order_currency_id] => 38
[order_full_price] => 0.01000
[order_tax_info] => Array
(
)
[order_discount_code] =>
[order_discount_price] => 0.00000
[order_discount_tax] => 0.00000
[order_payment_id] => 2
[order_payment_method] => alipay
[order_payment_price] => 0.00000
[order_payment_params] =>
[order_shipping_id] =>
[order_shipping_method] =>
[order_shipping_price] => 0.00000
[order_shipping_tax] => 0.00000
[order_shipping_params] =>
[order_partner_id] => 0
[order_partner_price] => 0.00000
[order_partner_paid] => 0
[order_partner_currency_id] => 0
[order_ip] => 115.64.108.79
[order_site_id] =>
)
-- 05.15.15 23:16:08 --
Array
(
[scheme] => http
[host] => notify.alipay.com
[path] => /trade/notify_query.do
[query] => partner=2088912559319093¬ify_id=ff0df07f91155fd66ebcf418aa656d6a3s
[port] => 80
)
-- 05.15.15 23:16:11 --
Array
(
[0] => HTTP/1.1 200 OK
[1] => Server: Tengine/2.1.0
[2] => Date: Fri, 15 May 2015 13:16:00 GMT
[3] => Content-Type: text/html;charset=GBK
[4] => Content-Length: 4
[5] => Connection: close
[6] => Set-Cookie: JSESSIONID=F19A51D02D1AA2CF2D648E2AC90A63A9; Path=/
[7] => Set-Cookie: ALIPAYJSESSIONID=GZ00rEJttkSZglEKZsrIp3Ymb1HSEQsuperapiGZ00; Domain=.alipay.com; Path=/
[8] => Set-Cookie: ctoken=SXu19OOxtYKU4cagN4a1XYUO3+IbZC; Domain=.alipay.com; Path=/
[9] => Cache-Control: max-age=0,no-cache
[10] => Expires: Thu, 05 Jan 1995 22:00:00 GMT
[11] => Pragma: no-cache
[12] => Set-Cookie: spanner=AoYqKdmrG2V1LjfjizZbnraTibwWXJaSXt2T4qEYgj0=;path=/;secure;
[13] =>
[14] => true
)
-- 05.15.15 23:16:11 --
sign1 :
6f9a0cd39c7ba4f3518002e1e940a467
-- 05.15.15 23:16:11 --
sign2 :
761158796dd03684546bf971e591f541
-- 05.15.15 23:16:11 --
invalid response
-- 05.15.15 23:18:41 --
Array
(
[option] => com_hikashop
[ctrl] => checkout
[task] => notify
[notif_payment] => alipay
[tmpl] => component
[lang] => en
[Itemid] => 329
[discount] => 0.00
[logistics_type] => EXPRESS
[receive_zip] => 3166
[payment_type] => 1
[subject] => order number : 64
[logistics_fee] => 0.00
[trade_no] => 2015051500001000320058924060
[buyer_email] => lliyyang2@163.com
[gmt_create] => 2015-05-15 21:15:56
[notify_type] => trade_status_sync
[quantity] => 1
[logistics_payment] => BUYER_PAY
[out_trade_no] => 64
[seller_id] => 2088912559319093
[notify_time] => 2015-05-15 21:18:28
[trade_status] => WAIT_SELLER_SEND_GOODS
[is_total_fee_adjust] => N
[gmt_payment] => 2015-05-15 21:18:28
[total_fee] => 0.01
[seller_email] => aotogou@gmail.com
[price] => 0.01
[buyer_id] => 2088002454394320
[gmt_logistics_modify] => 2015-05-15 21:15:56
[receive_phone] => +61452512657
[notify_id] => b7e89620380c399c5bcbd3256e2ee40c3s
[receive_name] => Li Yang
[use_coupon] => N
[sign_type] => MD5
[sign] => 71c7b9d9387f9a99aee2d686baece733
[receive_address] => U407 19 Hanover St
)
-- 05.15.15 23:18:41 --
stdClass Object
(
[order_id] => 64
[order_billing_address_id] => 22
[order_shipping_address_id] => 22
[order_user_id] => 11
[order_status] => created
[order_type] => sale
[order_number] => C6U4
[order_created] => 1431695527
[order_modified] => 1431695771
[order_invoice_id] => 0
[order_invoice_number] =>
[order_invoice_created] => 0
[order_currency_id] => 38
[order_full_price] => 0.01000
[order_tax_info] => Array
(
)
[order_discount_code] =>
[order_discount_price] => 0.00000
[order_discount_tax] => 0.00000
[order_payment_id] => 2
[order_payment_method] => alipay
[order_payment_price] => 0.00000
[order_payment_params] =>
[order_shipping_id] =>
[order_shipping_method] =>
[order_shipping_price] => 0.00000
[order_shipping_tax] => 0.00000
[order_shipping_params] =>
[order_partner_id] => 0
[order_partner_price] => 0.00000
[order_partner_paid] => 0
[order_partner_currency_id] => 0
[order_ip] => 115.64.108.79
[order_site_id] =>
)
-- 05.15.15 23:18:41 --
stdClass Object
(
[order_id] => 64
[order_billing_address_id] => 22
[order_shipping_address_id] => 22
[order_user_id] => 11
[order_status] => created
[order_type] => sale
[order_number] => C6U4
[order_created] => 1431695527
[order_modified] => 1431695771
[order_invoice_id] => 0
[order_invoice_number] =>
[order_invoice_created] => 0
[order_currency_id] => 38
[order_full_price] => 0.01000
[order_tax_info] => Array
(
)
[order_discount_code] =>
[order_discount_price] => 0.00000
[order_discount_tax] => 0.00000
[order_payment_id] => 2
[order_payment_method] => alipay
[order_payment_price] => 0.00000
[order_payment_params] =>
[order_shipping_id] =>
[order_shipping_method] =>
[order_shipping_price] => 0.00000
[order_shipping_tax] => 0.00000
[order_shipping_params] =>
[order_partner_id] => 0
[order_partner_price] => 0.00000
[order_partner_paid] => 0
[order_partner_currency_id] => 0
[order_ip] => 115.64.108.79
[order_site_id] =>
)
-- 05.15.15 23:18:41 --
Array
(
[scheme] => http
[host] => notify.alipay.com
[path] => /trade/notify_query.do
[query] => partner=2088912559319093¬ify_id=b7e89620380c399c5bcbd3256e2ee40c3s
[port] => 80
)
-- 05.15.15 23:18:46 --
Array
(
[0] => HTTP/1.1 200 OK
[1] => Server: Tengine/2.1.0
[2] => Date: Fri, 15 May 2015 13:18:33 GMT
[3] => Content-Type: text/html;charset=GBK
[4] => Content-Length: 4
[5] => Connection: close
[6] => Set-Cookie: JSESSIONID=C3435A84F2BF5B2138FB2EF4A154681C; Path=/
[7] => Set-Cookie: ALIPAYJSESSIONID=GZ00XRgPES621eaiHaFta0O8ZRLhxhsuperapiGZ00; Domain=.alipay.com; Path=/
[8] => Set-Cookie: ctoken=zm2nTjA4K7CypXqycCOfJALZUpO7d0; Domain=.alipay.com; Path=/
[9] => Cache-Control: max-age=0,no-cache
[10] => Expires: Thu, 05 Jan 1995 22:00:00 GMT
[11] => Pragma: no-cache
[12] => Set-Cookie: spanner=/Yd7Bz4dUzD6M5xJg5L8cb7MWl3iz1yw;path=/;secure;
[13] =>
[14] => true
)
-- 05.15.15 23:18:46 --
sign1 :
8eeb1e02444a05271b8cc2e035f9dcf9
-- 05.15.15 23:18:46 --
sign2 :
71c7b9d9387f9a99aee2d686baece733
-- 05.15.15 23:18:46 --
invalid response
Please Log in or Create an account to join the conversation.
- Posts: 12953
- Thank you received: 1778
sign1 :
8eeb1e02444a05271b8cc2e035f9dcf9
sign2 :
71c7b9d9387f9a99aee2d686baece733
[/code]
Also, note that the alipay payment method can't handle the "partner" mode, you should use the "direct" mode.
Please Log in or Create an account to join the conversation.
any feedback.
thanks
Please Log in or Create an account to join the conversation.
So, are you using the latest version of HikaShop ? If not, please update.
Then, if you still have the issue, please follow our instructions above and activate the debug mode of the payment plugin and do a test purchase again. Then, provide the content of the payment log file so that we can understand your issue.
Please Log in or Create an account to join the conversation.
and the debug report is below:(I have rewrite the buyer-email and seller-email for private reason,I think it does matter,right?)
Please Log in or Create an account to join the conversation.
- Posts: 12953
- Thank you received: 1778
You're actually having the same issue as aotogou@gmail.com :
Please Log in or Create an account to join the conversation.
I think I have the right setting in the alipay plugin.
because the plugin take affect.
but I don't understand why the sign is not the same.
have you any test on it?
Please Log in or Create an account to join the conversation.
- Posts: 12953
- Thank you received: 1778
1. Can you show me some screenshots of how you configured it ?
2. By the time I developed it, I had a customer account to directly test it, and it worked pretty fine, but now that we don't have any account we are not able to fully test it.
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
Without being able to directly test it do a "test purchase" I won't be able to understand from where the issue is coming from.Please tell me more.Let's fix it!
Please Log in or Create an account to join the conversation.