Skip to content

/AWS1/IF_MPG=>ACCEPTAGRMNTPAYMENTREQUEST()

About AcceptAgreementPaymentRequest

Allows buyers (acceptors) to accept a payment request that is in PENDING_APPROVAL status. Once accepted, the payment request transitions to APPROVED status and the charge will be processed. Buyers can optionally provide a purchase order reference for their internal tracking.

Only payment requests in PENDING_APPROVAL status can be accepted. A ConflictException is thrown if the payment request is in any other status.

Method Signature

METHODS /AWS1/IF_MPG~ACCEPTAGRMNTPAYMENTREQUEST
  IMPORTING
    !IV_PAYMENTREQUESTID TYPE /AWS1/MPGPAYMENTREQUESTID OPTIONAL
    !IV_AGREEMENTID TYPE /AWS1/MPGAGREEMENTID OPTIONAL
    !IV_PURCHASEORDERREFERENCE TYPE /AWS1/MPGPURCHASEORDERREF OPTIONAL
  RETURNING
    VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_mpgaccagrmtpmntreqout
  RAISING
    /AWS1/CX_MPGACCESSDENIEDEX
    /AWS1/CX_MPGCONFLICTEXCEPTION
    /AWS1/CX_MPGINTERNALSERVEREX
    /AWS1/CX_MPGRESOURCENOTFOUNDEX
    /AWS1/CX_MPGTHROTTLINGEX
    /AWS1/CX_MPGVALIDATIONEX
    /AWS1/CX_MPGCLIENTEXC
    /AWS1/CX_MPGSERVEREXC
    /AWS1/CX_RT_TECHNICAL_GENERIC
    /AWS1/CX_RT_SERVICE_GENERIC.

IMPORTING

Required arguments:

iv_paymentrequestid TYPE /AWS1/MPGPAYMENTREQUESTID /AWS1/MPGPAYMENTREQUESTID

The unique identifier of the payment request to accept.

iv_agreementid TYPE /AWS1/MPGAGREEMENTID /AWS1/MPGAGREEMENTID

The unique identifier of the agreement associated with the payment request.

Optional arguments:

iv_purchaseorderreference TYPE /AWS1/MPGPURCHASEORDERREF /AWS1/MPGPURCHASEORDERREF

An optional purchase order reference that buyers can provide to associate the payment request with their internal purchase order system.

RETURNING

oo_output TYPE REF TO /aws1/cl_mpgaccagrmtpmntreqout /AWS1/CL_MPGACCAGRMTPMNTREQOUT

Examples

Syntax Example

This is an example of the syntax for calling the method. It includes every possible argument and initializes every possible value. The data provided is not necessarily semantically accurate (for example the value "string" may be provided for something that is intended to be an instance ID, or in some cases two arguments may be mutually exclusive). The syntax shows the ABAP syntax for creating the various data structures.

DATA(lo_result) = lo_client->acceptagrmntpaymentrequest(
  iv_agreementid = |string|
  iv_paymentrequestid = |string|
  iv_purchaseorderreference = |string|
).

This is an example of reading all possible response values

lo_result = lo_result.
IF lo_result IS NOT INITIAL.
  lv_paymentrequestid = lo_result->get_paymentrequestid( ).
  lv_agreementid = lo_result->get_agreementid( ).
  lv_paymentrequeststatus = lo_result->get_status( ).
  lv_paymentrequestname = lo_result->get_name( ).
  lv_paymentrequestdescripti = lo_result->get_description( ).
  lv_positiveamountupto8deci = lo_result->get_chargeamount( ).
  lv_currencycode = lo_result->get_currencycode( ).
  lv_timestamp = lo_result->get_createdat( ).
  lv_timestamp = lo_result->get_updatedat( ).
ENDIF.