src/SecucardConnect/Product/Payment/Service/PaymentService.php
public function updateSubscription($paymentId, $purpose)
    {
        $class = $this->resourceMetadata->resourceClass;
        /**
         * @var $object Transaction
         */
        $object = new $class();
        $object->id = $paymentId;
        $object->subscription = new Subscription();
        $object->subscription->purpose = $purpose;
        $res = $this->updateWithAction($paymentId, 'subscription', null, $object, $class);

        if ($res) {
            return true;
        }

        return false;
    }
public function updateSubscription($paymentId, $purpose)
    {
        $class = $this->resourceMetadata->resourceClass;
        /**
         * @var $object Transaction
         */
        $object = new $class();
        $object->id = $paymentId;
        $object->subscription = new Subscription();
        $object->subscription->purpose = $purpose;
        $res = $this->updateWithAction($paymentId, 'subscription', null, $object, $class);

        if ($res) {
            return true;
        }

        return false;
    }
public function updateSubscription ( $ paymentId , $ purpose ) { $ class = $ this -> resourceMetadata -> resourceClass ; /**
         * @var $object Transaction
         */ $ object = new $ class ( ) ; $ object -> id = $ paymentId ; $ object -> subscription = new Subscription ( ) ; $ object -> subscription -> purpose = $ purpose ; $ res = $ this -> updateWithAction ( $ paymentId , 'subscription' , null , $ object , $ class ) ; if ( $ res ) { return true ; } return false ; }
Create or update a subscription for a existing transaction

@param string $paymentId The payment transaction id
@param string $purpose The purpose of the subscription
@return bool TRUE if successful, FALSE otherwise.
@throws GuzzleException
@throws ApiError
@throws AuthError
@throws ClientError
Create or update a subscription for a existing transaction