Pay partner invoice (card payment)
Last updated: 27-Apr-2017
Rate this article:
Overview
Pay a partner invoice that was set using setProforma. Works in conjunction with setProforma and setPaymentDetails. Call setProforma, then setPaymentDetails and payProforma in this specific order to pay for a partner invoice.
Requirements
This method requires that a specific partner be set using setPartner.
You also need to use setProforma to mark a partner invoice for payment, and specify the payment method with setPaymentDetails.
Parameters
Parameter | Type/Description |
---|---|
sessionID | Required (String) |
Session identifier, output of the Login method. An exception is thrown if the values are incorrect. |
Response
Parameter | Type/Description |
---|---|
result | Boolean |
True or false. |
Request
<?php
require ('PATH_TO_AUTH'); // Authentication example: https://knowledgecenter.avangate.com/Integration/Channel_Manager_API/JSON-RPC/02Authentication
require ('PATH_TO_setPartner'); // setPartner example: https://knowledgecenter.avangate.com/Integration/Channel_Manager_API/JSON-RPC/06Reference/Partner/00Set_partner
require ('PATH_TO_setProforma'); // setProforma example: https://knowledgecenter.avangate.com/Integration/Channel_Manager_API/JSON-RPC/06Reference/14Billing/00Capture_card_payment/00Set_partner_invoice
require ('PATH_TO_setPaymentDetails'); // setPaymentDetails example: https://knowledgecenter.avangate.com/Integration/Channel_Manager_API/JSON-RPC/06Reference/14Billing/00Capture_card_payment/02Set_partner_invoice_payment_details
$jsonRpcRequest = array (
'jsonrpc' => '2.0',
'id' => $i++,
'method' => 'payProforma',
'params' => array($sessionID)
);
var_dump (callRPC((Object)$jsonRpcRequest,$host));
Errors
Error | Description |
---|---|
INVALID_PARTNER |
No partner is set. |
PAYMENT_PROFORMA |
You must use setPaymentDetails first. |
PAYMENT_PROFORMA |
This is a paid partner invoice. |
PAYMENT_ERROR |
Authorization error. |
Rate this article: