Creates a :class:`Payment` object from an XDR Operation
        object.

def from_xdr_object(cls, op_xdr_object):
        """Creates a :class:`Payment` object from an XDR Operation
        object.

        """
        if not op_xdr_object.sourceAccount:
            source = None
        else:
            source = encode_check(
                'account', op_xdr_object.sourceAccount[0].ed25519).decode()

        destination = encode_check(
            'account',
            op_xdr_object.body.paymentOp.destination.ed25519).decode()
        asset = Asset.from_xdr_object(op_xdr_object.body.paymentOp.asset)
        amount = Operation.from_xdr_amount(op_xdr_object.body.paymentOp.amount)

        return cls(
            source=source,
            destination=destination,
            asset=asset,
            amount=amount,
        )