อัพเดตเมื่อ: 20 ก.ค. 2020
Our journey begins as we set out to find the right payment solutions for our customer’s ecommerce stores. What they want is more than just a traditional credit card payment option, they want the complete modernized package. As the world is moving towards cashless society, services like WeChat Pay, Alipay, and PromptPay have become more prominent among the end-users. “We got to have it all” said our client, we must not underestimate how the variety of payment options available can greatly improve the end-users’ experience.
So we get to work, searching through many payment solution companies that will meet our needs and expectations. Needless to say, the perfect partner is hard to come by. Some provide little to no support and some doesn’t even answer our email in a timely manner. But, the search continues.
A new player is in town
The first time we heard about Ksher is through our client. They have used the service before and got great things to say. Ksher is a fairly new payment provider in Thailand and Southeast Asian markets, aiming to solve China cross-border payment problems. The fintech company originated from China in 2016, and later won Excellence Service Awards at WeChat Pay Partner Conference in 2019.
Ksher has grown rapidly in the past few years, and the decision to operate in Thailand is absolutely a great one. With the number of inbound Chinese tourists expected to increase, Ksher would allow them to conveniently pay with e-wallets in their own currency at big or small shops alike.
The complete package
Ksher offers many types of payment services including static QR code signs for small shops, EDC machines with POS integration for medium to large size stores, and dynamic QR code that connects APIs with ecommerce platforms. This is a perfect fit for our clients. However, there are still obstacles to overcome. Connecting Ksher API to Magento’s platform is proven to be difficult to say the least. With our clients increasingly wanting to develop more innovative features to their store, a simpler platform like Shopify will not be suitable for many of our projects.
With Ksher, customers will be able to scan the QR code and complete the payment with WeChat Pay, Alipay, or PromptPay immediately after the order is placed. They no longer need to dig out a credit card and enter the number, expiration date, and security code; although that is also an available option.
Integrate with Magento
We decided to implement Ksher payment gateway with Magento 2 Community Edition for our client Naraya; Thailand’s handbag and accessories brand. Don’t forget to go checkout Naraya Online Store after you finish this article, you will definitely want to buy their amazing products.
Not to our surprise, there is no plug-and-play plugin extension to connect Magento 2 with Ksher’s API as of now. So, we are forced to go with custom implementation, and we are proud to say that we are among the first agencies to successfully implement Ksher payment with Magento 2. Despite detailed and straight-forward documentation provided by Ksher, there are some problems that came up during our development phase. However, we believe that there is a solution to every problem and here is how we managed the key issues from integrating Ksher payment for the first time.
1. Order confirmation email is sent to the customer despite incomplete payment
We noticed that the customer will get an order confirmation email immediately after the order is placed without having to complete the payment. After having a meaningful discussion with Ksher’s support team, we decided to create custom email templates for each of the payment options separately. This way, we can adjust the contents of the email to include a link of the QR code payment.
Now, after the order is placed, customers will receive an confirmation email with a link to complete the payment process if they haven’t done so, which is time-limited to 5 minute after launching for security reasons; after the time has expired the page will be reloaded with custom graphic to state that the QR code is now invalid.
2. Payment success page is missing
After customers scan and complete the payment, there is no callback from Ksher API that there is a success. The solution is for the system to send order query to Ksher.
In the case that the customer still stays in the QR code page, we edit the function in the controller to check the current order status. If the status is pending, the system will send another query to check the payment result then change the order status to processing. On the other hand, in the case that the QR code page is turned off, the function in the controller will check constantly in the span of 2 hour period. If the payment is successful, the order status will change to processing.
So after this implementation, within 3 to 5 seconds after the payment is completed, we will receive back a success signal or a failure signal. Depending on which, the client will be sent to the correct page.
3. Payment duplication can happen
In any circumstances that the customer has already paid but the payment success page doesn’t show up, there is a chance that the customer will make a duplicate payment via the QR code link in the order confirmation email. We fix this by creating a custom graphic to overlay onto the QR code when the payment success signal has been received. This way there is no chance that payment duplication can occur.
At the end of our journey
We are really happy about Ksher. Their documentation is clear and intuitive, and the support team has done an amazing job helping us get through the complex implementation process. At the end, the project is completed and our client has only great things to say. We will be surely recommending Ksher for our next client. If you are looking for an intuitive payment gateway, fast, and reliable, go check them out.
Lastly, we at KOS Design are ready to transform your business into digital. Ecommerce store, corporate website, branding, graphic design, digital marketing, and SEO, we do them all. We have many great partners in the industry, and you will not be disappointed. We are ready and committed to help you move forward, so give us a call or send us a message, we would love to start working with you.