Download the PHP package se468/kakaopay-php without Composer
On this page you can find all versions of the php package se468/kakaopay-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download se468/kakaopay-php
More information about se468/kakaopay-php
Files in se468/kakaopay-php
Informations about the package kakaopay-php
Kakaopay REST API PHP wrapper
Wrapper for Kakaopay REST API. Kakaopay provides convenient way to do internet transaction in Korea because it doesn't need a separate Payment Gateway (PG). The transaction is done only with the user's Kakaotalk account.
Official Kakaopay REST API documentation: here.
Example Implementation: here.
Demo: here.
Installation
Via Composer:
Usage
Single payment process
Payment Ready
Used for requesting the user for the transaction. User will receive a message to confirm the transaction.
API Endpoint:
Usage Example:
Here's the explanation of the process:
-
Result from
payment/ready
will have transation ID, ortid
($result->tid
), which you can safely store in your session. -
Store the
tid
in session and redirect to$result->next_redirect_pc_url
. Customer will be prompted to enter their Kakaopay phone number and password. -
After the customer fills in the form, they will receive a message in their Kakaotalk to approve the transaction. The screen will then redirect to the
approval_url
that you've provided. - You can then call
payment/approve
using thetid
stored in the session and it will process the payments.
Payment Approve
With the given tid
from payment ready, approve the transaction to finalize.
Example:
- You can delete the
tid
after you get the result from here, and store the$result
in your DB, which contains the information about the transaction and show it back to the customer.
Subscription Process
Payment Ready
Example Payment Ready for subscription
Note that only thing different here from single payment is the
cid
parameter.
Payment Approve
Check the documentation for single payment. It is exactly same process.
Subscription from second payment
On going subscription fees can be called like the following:
Example:
Cancelling Payments
Order checking
Example:
Checking the Subscription information
Example:
Deactivating Subscription
Example: