Scenarios
Before using ECPay’s merchant member credit card binding service, the merchant’s server must first obtain a vendor verification token from ECPay’s server. Once the merchant server receives the token, it must pass the token to the merchant’s website to generate the credit card binding interface.
Credit card operation process description (with 3D validation)
- Client: To start using the JS SDK, initialization is required, and environment variables must be set.
- Server: After confirming the order details, the merchant server calls the GetTokenbyBindingCard API to obtain the vendor verification token.
- Client: The client calls the
addBindingCard()
function in the JS SDK, passing the token returned from the vendor verification API, displaying the credit card binding interface. - Client: After the consumer completes the credit card information and presses the button, the client calls the
getBindCardPayToken()
function in the JS SDK, receiving the returned BindCardPayToken. - Server: The server calls the API to create the credit card binding transaction, passing in the BindCardPayToken.
- Server: If the transaction requires 3D authentication, the credit card binding transaction API will return the 3D authentication URL. Otherwise, it will return the payment result, skipping steps 7 and 8.
- Client: The client redirects to the page, opening the 3D authentication URL to perform verification and authorization.
- Client: The client receives the credit card binding authorization result via the
OrderResultURL
. - Server: The server receives the binding authorization result notification in the background via the
ReturnURL
.
Special note:Step 7: The merchant must use the obtained 3D authentication URL to implement the 3D authentication redirection page, providing the user with the credit card 3D authentication process to complete the credit card authorization.
