VTCPay SDK is the framework to make payments between VTCPay Online Payment gateway, the payment intermediaries and App Merchant which is in the role of sales unit and uses the online payment via VTCPay e-wallet, banks and international cards.
Create AppID code (application code) for application integrated SDKVTCPay. This AppID play the role identifier for your app on the VTCPay system. •Visit our website: https://vtcpay.vn/ •Registration VTCPay account, and log in to the site. •Then go to the section " Integration Payment" and select the "Integration Mobile". •Enter the necessary informations and Confirm.
Finally, select the "Integrated Management" to see the application code of the application just created.
- Add or drag the file “VTCPaySDKWap.framework” into your Xcode Project. Leave the “Copy items if needed” is checked.
- Add VTCPaySDKWap.framework binary into General > Embedded Binaries
- In the AppDelegate class (or UnityAppController, or AppController), find the method application:didFinishLaunchingWithOptions:. Then add this line of code if you want change environment to sandbox:
- Required data
Note:
- Show home SDK
- Login
- Get getAssociationResponse: after login (require) accesstoken can get via method below:
Swift:
Objc:
- Topup:
- Payment
+ VTCPaySDKWapManagerPaymentDelegate:
Note:
+ Call payment:
Trong đó:
- Logout:
- Require:
Code General:
- context
- nameFunction
- appInfoModel: contains the integrated parameters (MerchantAppID, MerchantAccountName, AppSecretKey)
- iCallback: (responseCode, Description)
a. Login:
- nameFunction: VTCPaySDK.LOGIN
- iCallback : Icallback
- associationResponse: AccessToken.
b. Topup:
- nameFunction: VTCPaySDK.TOPUP
- iCallback : Icallback
c. Payment:
- nameFunction: VTCPaySDK.PAYMENT
- appInfoModel: add more parametes:
- callback: IPaymentCallback (return VTCPaymentData when the transaction is successful)
d. Logout:
- VTCPaySDK.logout(Context context)
Status | Mean | Note |
---|---|---|
0 |
|
Transaction status of initializing |
1 |
SUCCESS |
Successful transaction |
7 |
REVIEW |
Payment account of customer is deducted but Merchant’s account is not credited.Payment admin department of VTC will approve to decide transaction is successful or failed. |
-1 |
FAIL |
Failed transaction |
-9 |
FAIL |
Customer cancel transaction |
-3 |
FAIL |
VTC admin cancel transaction |
-4 |
FAIL |
Account not eligible for transaction(Locked, not registered for online payment ...) |
-5 |
FAIL |
Customer account balance(VTC Pay ewallet, bank account) is not sufficient to make payment |
-6 |
FAIL |
Transaction error at VTC |
-7 |
FAIL |
Customer enter wrong payment information(account information or OTP) |
-8 |
FAIL |
Exceed day transaction limit |
-22 |
FAIL |
Order payment value is too small |
-24 |
FAIL |
Order payment currency is not valid |
-25 |
FAIL |
Merchant’s VTC Pay receiving account does not exist |
-28 |
FAIL |
Lack of compulsory parameters in one online payment order |
-29 |
FAIL |
Request parameter is not valid |
-21 |
CHECK |
Duplicating transaction reference.May be because of duplicating solving is not good, poor internet connection, customer enter F5, or poor transaction code generating, partner must check to get the final result of this transaction |
-23 |
CHECK |
WebsiteID does not exist |
-99 |
CHECK |
Undefined errors and transaction status.Must check to know if transaction is successful or not |
Hanoi (Headquarter): Floor 14 - VTC Building, 23 Lac Trung Street, Hai Ba Trung District, Hanoi
HCMC(Branch) : 259 Dong Den Street, Ward 10, Tan Binh District, HCMC
Sale manager: Mr.Cao Ngoc Tan – Email: tancn@vtc.vn
Contact : 1900 1530 - 08 9999 1530 - https://vtcpay.vn