Difference between revisions of "CreatePurchase"

From Gvp-public
Jump to navigation Jump to search
Line 70: Line 70:
 
* [[AuthenticationRequired]] --> If user Anonymous
 
* [[AuthenticationRequired]] --> If user Anonymous
 
* [[UserPurchasePinValueNoMatch]] --> if user pin doesn't match or sent empty
 
* [[UserPurchasePinValueNoMatch]] --> if user pin doesn't match or sent empty
* [[InvalidPaymentType]] --> if paymentType = Unknown || (PaymentType not in product payment types)
+
* [[InvalidPaymentType]] --> if paymentType = Unknown or PaymentType not in product payment types
 
 
 
* [[UserDoesNotHaveMandatorySubscription]] --> If mandatory subscription is active, User has not purchase it, and user is trying to buy a product != MandatorySubscription
 
* [[UserDoesNotHaveMandatorySubscription]] --> If mandatory subscription is active, User has not purchase it, and user is trying to buy a product != MandatorySubscription
 
* [[InvalidReturnOrCancelURL]] --> if paymentType = Paypal, webpay or worldpay and returnUrl or cancelURl empty or null
 
* [[InvalidReturnOrCancelURL]] --> if paymentType = Paypal, webpay or worldpay and returnUrl or cancelURl empty or null

Revision as of 12:23, 3 July 2015

Description

Create a purchase for product

Parameters

  • token (String, required)
A valid token for identifying the API session context and logged user.
  • productId (int, required)
Product Id of the subscription to be purchased
  • productType (int, required)
This use case deals with subscriptions.
  • pricingModelId (int, required)
Pricing Model Id
  • pin (String, required)
User purchase PIN
  • returnURL (String, required)
This parameter makes sense only with paypal an ewallet payment methods.
  • cancelURL (String, required)
This parameter makes sense only with paypal an ewallet payment methods.


Returns

Returns a JSON with a PurchaseResponse object containing information that Purchase has been created with success.

Example:

{

"Offset": 0,
"Limit": 100,
"Count": 6,
"Content": [
PurchaseResponse object
]

}


Exceptions


Caching

This method is not cached.


Known issues

None


Version history

API Version Number Change description Changes author
1.0 Initial method design Harley Cabral


See also