Buyvite is simple to intergrate into existing code. A Buyvite transaction is submitted through a direct post method which sends data to Buyvite's server via
standard HTTP request over an SSL connection. Once you have requested a partnership you will be provided a
Partner ID for testing.
Buyvite Transaction Request
Your site will need to make a POST request to https://buyvite.com/api/transact.aspx with the following parameters:
|partnerid||Yes||The ID provided to you from Buyvite once you become a Buyvite partner.|
|product||Yes||Simple name of product purchased (list separated by | if multiple products are purchased.).|
|amount||Yes||Amount of purchase, numbers only.|
|buyvitecode||Yes||The code from Buyvite that your customer enters in leui of other payment on your checkout screen.
|orderid||No||The order id from your site. Maximum of 22 characters.|
|testmode||No||Set to "true" to indicate test mode and enable passing of test buyvite codes.|
Buyvite Transaction Response
Buyvite returns an XML Formatted Response, with a success code and descriptive text.
Buyvite XML Response
|code||Possible return values:|
-1: configuration error
0: transaction failed
1: transaction succeeded
|description||Description of problem on failure (code -1 or 0).
Code 0 descriptions should be displayed to the customer.
Testing your implementation
Buyvite codes available for use in testmode to simulate possible Buyvite xml responses include:
|test buyvitecode |
|BV_CREDITFAIL||Buyvite transaction failed due to the failure of one of the contributing credit/debit cards.|
|BV_INVAMOUNT||Insufficient contributions to cover amount.|
|BV_CANCELCODE||Buyvite code has been cancelled.|
|BV_USEDCODE||Buyvite code has already used.|
|BV_INVCODE||Invalid Buyvite code.|
* Note: testmode is solely for testing API implementation, it does not simulate the entire process of a Buyvite transaction.