Response¶
Response objects are generated by a gateway after data is sent back from Veritrans about a request. Response formats can vary depending on the type of error encountered from Veritrans, so the only two parameters that are required for ALL responses are status_code, and status_message. The rest are all purely optional (though unexpected parameters will be ignored).
To see the expected attributes for a given type of request, check the documentation at:
- http://docs.veritrans.co.id/sandbox/other_commands.html
- http://docs.veritrans.co.id/sandbox/charge.html
-
class
veritranspay.response.response.ResponseBase(status_code, status_message, *args, **kwargs)[source]¶ Bases:
veritranspay.mixins.SerializableMixinBase class for all responses from Veritrans. The only two things we can be safely assured should be in every transaction are status_code and status_message.
Parameters: - status_code (
str) – Transaction status code supplied by Veritrans. - status_message (
str) – Human-readable status message.
- status_code (
-
class
veritranspay.response.response.ChargeResponseBase(*args, **kwargs)[source]¶ Bases:
veritranspay.response.response.ResponseBaseEncapsulates the response from Vertrans, returned after a
veritranspay.request.ChargeRequest.
-
class
veritranspay.response.response.CreditCardChargeResponse(*args, **kwargs)[source]¶ Bases:
veritranspay.response.response.ChargeResponseBaseResponse from Veritrans, returned after a
veritrans.request.ChargeRequestwith a charge type ofveritrans.payment_types.CreditCard.
-
class
veritranspay.response.response.IndomaretChargeResponse(*args, **kwargs)[source]¶ Bases:
veritranspay.response.response.ChargeResponseBaseCStore charge response when using payment_types.Indomaret
http://docs.veritrans.co.id/en/vtdirect/integration_indomrt.html#response-transaction-indomrt
-
class
veritranspay.response.response.StatusResponse(*args, **kwargs)[source]¶ Bases:
veritranspay.response.response.ResponseBaseEncapsulates information about the status of a single charge. Returned from Veritrans after submitting a
veritranspay.request.StatusRequest
-
class
veritranspay.response.response.CancelResponse(*args, **kwargs)[source]¶ Bases:
veritranspay.response.response.ResponseBaseData returned from Veritrans after submitting a
veritranspay.request.CancelRequest.
-
class
veritranspay.response.response.VirtualAccountPermataChargeResponse(*args, **kwargs)[source]¶ Bases:
veritranspay.response.response.ChargeResponseBaseResponse from Veritrans, returned after a
veritrans.request.ChargeRequestwith a charge type ofveritrans.payment_types.VirtualAccountPermata.
-
class
veritranspay.response.response.VirtualAccountBcaChargeResponse(*args, **kwargs)[source]¶ Bases:
veritranspay.response.response.ChargeResponseBaseResponse from Veritrans, returned after a
veritrans.request.ChargeRequestwith a charge type ofveritrans.payment_types.VirtualAccountBca.
-
class
veritranspay.response.response.VirtualAccountBniChargeResponse(*args, **kwargs)[source]¶ Bases:
veritranspay.response.response.ChargeResponseBaseResponse from Veritrans, returned after a
veritrans.request.ChargeRequestwith a charge type ofveritrans.payment_types.VirtualAccountBni.
-
class
veritranspay.response.response.VirtualAccountMandiriChargeResponse(*args, **kwargs)[source]¶ Bases:
veritranspay.response.response.ChargeResponseBaseResponse from Veritrans, returned after a
veritrans.request.ChargeRequestwith a charge type ofveritrans.payment_types.VirtualAccountMandiri.
-
class
veritranspay.response.response.EpayBriChargeResponse(*args, **kwargs)[source]¶
-
veritranspay.response.response.build_charge_response(request, *args, **kwargs)[source]¶ Builds a response appropriate for a given type of request.
Parameters: request ( veritranspay.request.ChargeRequest) – The request that was submitted to Veritrans. The charge_type is used to determine the appropriate response type to build.
-
class
veritranspay.response.response.ApproveResponse(*args, **kwargs)[source]¶ Bases:
veritranspay.response.response.ResponseBaseData returned from Veritrans after submitting a
veritranspay.request.ApprovalRequest