Details
-
Type:
Bug
-
Status: Closed
-
Priority:
Major
-
Resolution: Cannot Reproduce
-
Affects Version/s: 3.2.0
-
Fix Version/s: None
-
Component/s: payment gateways
-
Environment:Tomcat + MySql
Description
Preconditions: setup YC environment with MySQL and PayPal (sandbox account is used while testing) payment gateway and import icecat catalog data;
1. Create a user with shipping address and login to YC shop;
2. Put any products to your basket;
3. Go to your cart and click checkout;
4. Select a shipping address and go shipping method selection;
5. Select a shipping method and go to payment selection;
6. Select to pay using Paypal Button and click on "Buy Now";
7. Login to sandbox paypal account, pay and after a successful payment click to navigate back to store;
8. YC notifies that order placed successfully.
Expected result: Order is placed and can be reviewed in "My orders". Also, admin can approve an order and start shipping.
Actual result: Order does not appear in "My orders" section. Admin can find an order, but no action can be processed as payment does no exist for an order (Payment status: none).
This is screenshot how order entry looks in admin: http://s18.postimg.org/w42r69zmx/orders.jpg
All PaylPal payments require a verified callback from PayPal to confirm the payment. In your step #8 YC does a soft confirm (i.e. it cannot be detected if payment was successful but there were no errors so the message is displayed). The screen in YUM signifies that order has been created and is in state "none" because it is waiting for callback.
Note that PayPal callbacks require full domain name with SSL (i.e. callback it performed to HTTPS) see http://www.inspire-software.com/confluence/display/YC3EN/Payment+methods#Paymentmethods-PayPalButton PayPal is also known to reject some SSL certificates that it does not "like".
You also should enable logging for payments to trace callbacks as if the callback cannot be verified it will be rejected and also will remain in state "none".
Here are some examples:
<appender name="SHOP10PAY" class="ch.qos.logback.core.rolling.RollingFileAppender">
{yyyy-MM-dd HH:mm:ss.SSS}<!--See also http://logback.qos.ch/manual/appenders.html#RollingFileAppender-->
<Append>true</Append>
<File>${catalina.base}/logs/yc-mmspay.log</File>
<encoder>
<pattern>%d
%5p %c
{1}:%L - %m%n</pattern>
</encoder>
<rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
<maxIndex>10</maxIndex>
<FileNamePattern>${catalina.base}/logs/yc-mmspay.log.%i</FileNamePattern>
</rollingPolicy>
<triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
<MaxFileSize>10MB</MaxFileSize>
</triggeringPolicy>
</appender>
<logger name="SHOP10.org.yes.cart.web.filter.payment" level="DEBUG">
<appender-ref ref="SHOP10PAY"/>
</logger>
<logger name="SHOP10.org.yes.cart.payment.impl" level="DEBUG">
<appender-ref ref="SHOP10PAY"/>
</logger>
<logger name="SHOP10.org.yes.cart.web.page.payment.callback" level="DEBUG">
<appender-ref ref="SHOP10PAY"/>
</logger>
<logger name="com.paypal.core.HttpConnection" level="DEBUG">
<appender-ref ref="SHOP10PAY"/>
</logger>
You can test logging by posting to your callback URI, which should be something like:
https://www.yourshopdomain.com/paymentpaypalbutton or https://www.yourshopdomain.com/yes-shop/paymentpaypalbutton (depending if you deployed as ROOT.war or yes-shop.war respectively)